Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroGlezC authored Apr 27, 2024
1 parent dacbb3a commit 28ddf94
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
create-bags:
runs-on: ubuntu-latest
steps:
- name: Create Coverage Badges
uses: jaywcjlove/coverage-badges-cli@main
with:
style: flat
source: coverage/coverage-summary.json
output: coverage/badges.svg
jsonPath: totals.percent_covered

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build

backend-tests:
runs-on: ubuntu-latest
defaults:
Expand Down Expand Up @@ -63,6 +80,16 @@ jobs:
node-version: '21' # Cambia según tu versión de Node.js
- run: npm ci
- run: npm test
- run: npm run jest-coverage
- run: npm i coverage-badges-cli -g
- run: coverage-badges --output coverage/badges.svg

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./coverage
# - name: Install dependencies
# run: npm install

Expand Down

0 comments on commit 28ddf94

Please sign in to comment.