Skip to content

Commit

Permalink
Merge pull request #51 from skanda890/main2
Browse files Browse the repository at this point in the history
Update ci.yml
  • Loading branch information
skanda890 authored Aug 9, 2024
2 parents b9f7dc8 + cc55025 commit 7e482f4
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ on:
- main

jobs:
test:
unit-test:
name: Run unit tests
runs-on: ubuntu-latest

env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v2
Expand All @@ -27,14 +27,13 @@ jobs:
- name: Install dependencies
run: npm install

- name: Run tests
run: npm run test:ci
- name: Test with npm
run: npm test -- --coverage --reporter=junit --outputFile=./test-results.xml

- name: Upload test results
uses: actions/upload-artifact@v2
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
name: test-results
path: ./test-results.xml
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
Expand All @@ -61,11 +60,9 @@ jobs:
run: |
pip install --upgrade pip
pip install -r requirements.txt
- name: Lint and test
run: |
pytest --cov app
- name: Upload coverage to Codecov
if: success()
uses: codecov/codecov-action@v2
Expand All @@ -90,15 +87,13 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache npm
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
notifications:
email:
recipients:
Expand Down

0 comments on commit 7e482f4

Please sign in to comment.