Skip to content

Commit

Permalink
feat(14-artifacts): upload test coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
lauromueller committed Nov 12, 2023
1 parent 44a8a2c commit 77028a4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/14-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: 14 - Working with Artifacts
on:
workflow_dispatch:

env:
build-artifact-key: app-${{ github.sha }}
test-coverage-key: test-coverage-${{ github.sha }}

jobs:
test-build:
runs-on: ubuntu-latest
Expand All @@ -26,13 +30,18 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Unit tests
run: npm run test
run: npm run test -- --coverage
- name: Upload test results
uses: actions/upload-artifact@v3
with:
name: ${{ env.test-coverage-key }}
path: 14-artifacts/react-app/coverage
- name: Build code
run: npm run build
- name: Upload build files
uses: actions/upload-artifact@v3
with:
name: app
name: ${{ env.build-artifact-key }}
path: 14-artifacts/react-app/build
deploy:
runs-on: ubuntu-latest
Expand All @@ -41,7 +50,7 @@ jobs:
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: app
name: ${{ env.build-artifact-key }}
path: build
- name: Show folder structure
run: ls -R

0 comments on commit 77028a4

Please sign in to comment.