Skip to content

Commit

Permalink
Nx run many
Browse files Browse the repository at this point in the history
  • Loading branch information
blackravenx committed Feb 17, 2024
1 parent 95c8fd0 commit 25ddb39
Showing 1 changed file with 8 additions and 37 deletions.
45 changes: 8 additions & 37 deletions .github/workflows/coverage-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ jobs:
pr_pipeline:
runs-on: ubuntu-latest

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

if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v3
Expand All @@ -26,49 +22,24 @@ jobs:
cache: npm

- name: Install Dependencies
run: npm ci

- name: Build (Nx Affected)
uses: mansagroup/nrwl-nx-action@v2
with:
targets: build
affected: true
nxCloud: false

- name: Lint (Nx Affected)
uses: mansagroup/nrwl-nx-action@v2
with:
targets: lint
affected: true
nxCloud: false

run: npm install && npm ci

- name: Test with Coverage (Nx Affected)
uses: mansagroup/nrwl-nx-action@v2
with:
targets: test
affected: true
nxCloud: false
args: '--coverage --coverageReporters=json,json-summary'
run: 'npx nx run-many -t test --skip-nx-cache --coverage --coverageReporters=json,json-summary'

- name: Download Artifact (base code coverage results)
uses: dawidd6/action-download-artifact@v2
id: restoreCodeCoverage
- name: Archive сode сoverage results
uses: actions/upload-artifact@v3
with:
workflow: coverage-report.yaml
workflow_conclusion: success
branch: main
name: code-coverage-report
path: ./coverage-base
continue-on-error: true
path: ./coverage/**/coverage-summary.json
if-no-files-found: error

- name: Comment Code Coverage on PR
- name: Code сoverage
uses: dkhunt27/nx-code-coverage@v1
with:
github-token: ${{ secrets.AUTH_TOKEN }}
no-coverage-ran: false
coverage-folder: ./coverage
coverage-base-folder: ./coverage-base
gist-processing: true
gist-token: ${{ secrets.GIST_SECRET }}
gist-id: d34d7d9392f4f0e6aa927cb035b86d34
color: green
Expand Down

0 comments on commit 25ddb39

Please sign in to comment.