Skip to content

Commit

Permalink
codecov parcial
Browse files Browse the repository at this point in the history
  • Loading branch information
enrgaroli committed Apr 29, 2024
1 parent 21c0df0 commit d93c744
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 41 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- run: npx playwright install --with-deps
- run: npm test
- run: npm run coverage
- run: npm run report-test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
49 changes: 8 additions & 41 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,8 @@
name: Running Code Coverage

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

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

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- name: playwright dependencies
run: npx playwright install --with-deps

- name: start
run: npm start &

- name: Run tests
run: npm run test-integration

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: '${{ secrets.CODECOV_TOKEN }}'
slug: gti-sos/SOS2324-14
coverage:
status:
project:
default:
target: 10%
patch:
default:
target: 10%
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"test-youtube-trends": "npx newman run ./tests/integration/apiVEG-gcloud.json -e ./tests/integration/enviroments/gcloud.json",
"test-e2e": "npx playwright test",
"coverage": "nyc npm run test-integration",
"report-test": "nyc report --reporter=text-lcov > coverage.lcov",
"test": "npm run test-integration && npm run test-e2e",
"posttest": "kill `ps -uax | grep \"node index\" | grep -v \"grep\" | grep -v \"sh\" | awk '{print $2}'`"
},
Expand Down

0 comments on commit d93c744

Please sign in to comment.