diff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.yml new file mode 100644 index 00000000..a8377049 --- /dev/null +++ b/.github/workflows/backend-tests.yml @@ -0,0 +1,30 @@ +name: Run ESLint on Push and Pull Requests +on: + push: + branches: + - main + - develop + pull_request: + branches: + - main + - develop + +jobs: + build: + name: Run ESLint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 18.17.0 + - name: Install dependencies for the backend + run: npm install + working-directory: src/server/workspace + - name: Run Backend Tests + run: npm run test + working-directory: src/server/workspace + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 53a5fb3c..98920499 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -32,4 +32,4 @@ jobs: working-directory: src/client - name: Run Backend Linters run: npm run lint - working-directory: src/client \ No newline at end of file + working-directory: src/server/workspace \ No newline at end of file diff --git a/README.md b/README.md index fec53d11..af5f1a03 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Issue Tracking](https://img.shields.io/badge/Issue_Tracking-GitHub_Issues-yellow)](https://github.com/COS301-SE-2024/ClassConnect/issues) -[![Code Coverage](https://img.shields.io/badge/Code_Coverage-Coveralls-blue)](link_to_coveralls) +[![codecov](https://codecov.io/github/COS301-SE-2024/ClassConnect/graph/badge.svg?token=W2cOxCJT1g)](https://codecov.io/github/COS301-SE-2024/ClassConnect) [![Monitoring](https://img.shields.io/badge/Monitoring-NodePing%2C%20PingPong%2C%20Security_Headers%2C%20Uptime_Robot-lightgrey)](link_to_monitoring)