From 25ddb3959678da1985877fd5de15085b7697f21b Mon Sep 17 00:00:00 2001 From: Max Shyn Date: Sun, 18 Feb 2024 02:53:30 +0600 Subject: [PATCH] Nx run many --- .github/workflows/coverage-report.yaml | 45 +++++--------------------- 1 file changed, 8 insertions(+), 37 deletions(-) diff --git a/.github/workflows/coverage-report.yaml b/.github/workflows/coverage-report.yaml index 1ecf2b0..af270b2 100644 --- a/.github/workflows/coverage-report.yaml +++ b/.github/workflows/coverage-report.yaml @@ -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 @@ -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