build(deps): bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Workflow | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
setup: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
name: Setup | |
runs-on: ubuntu-latest | |
outputs: | |
hasChanges: ${{ steps.affected.outputs.hasChanges }} | |
matrix: ${{ steps.affected.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 12 | |
- name: Cache npm | |
uses: actions/cache@v2 | |
with: | |
path: .npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
${{ runner.os }}- | |
- name: Install Dependencies | |
run: npm ci --cache .npm | |
- name: Calculate Affected Projects | |
uses: e-square-io/nx-github-actions/dist/packages/nx-affected-matrix@v1 | |
id: affected | |
with: | |
targets: 'lint,test,build' | |
distributed-task: | |
name: Run ${{ matrix.target }} ${{ matrix.bucket }} | |
if: ${{ needs.setup.outputs.hasChanges == 'true' }} | |
runs-on: ubuntu-latest | |
needs: [setup] | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 12 | |
- name: Cache npm | |
uses: actions/cache@v2 | |
with: | |
path: .npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
${{ runner.os }}- | |
- name: Install Dependencies | |
run: npm ci --cache .npm | |
- name: Execute target | |
uses: e-square-io/nx-github-actions/dist/packages/nx-distributed-task@v1 | |
id: execute | |
with: | |
nxCloud: true | |
target: ${{ matrix.target }} | |
bucket: ${{ matrix.bucket }} | |
projects: ${{ matrix.projects }} | |
coverage: | |
name: Publish coverage | |
runs-on: ubuntu-latest | |
needs: [distributed-task] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Download artifacts | |
uses: actions/[email protected] | |
with: | |
name: test | |
- uses: codecov/codecov-action@v1 | |
with: | |
directory: ./coverage/packages/* | |