yoloanda is running CI/CD on UTSC-CSCC01-Software-Engineering-I/ci-cd-example-yoloanda #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI/CD | |
| run-name: ${{ github.actor }} is running ${{ github.workflow }} on ${{ github.repository }} | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| node-version: [12.x] | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v2 | |
| - name: Use Node.js 18.x | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: 18.x | |
| - name: Testing frontend | |
| run: | | |
| ls | |
| cd client | |
| npm install | |
| npm test | |
| - name: Testing backend | |
| run: | | |
| cd backend | |
| npm install | |
| npm test | |
| # - name: Publish code coverage | |
| # uses: paambaati/codeclimate-action@v3.2.0 | |
| # env: | |
| # CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} | |
| # with: | |
| # coverageLocations: | | |
| # ${{github.workspace}}/client/coverage/lcov.info:lcov | |
| # ${{github.workspace}}/server/coverage/lcov.info:lcov |