Skip to content

Commit a83b373

Browse files
committed
ci: store only one report
1 parent e06d452 commit a83b373

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/basic-test.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,21 @@ jobs:
3535
name: library-dist-${{ github.sha }}
3636
path: dist
3737

38+
set-node-version:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v4
43+
44+
- name: Set Node.js version based on .nvmrc
45+
id: set-node-version
46+
run: |
47+
version=$(cat .nvmrc)
48+
echo "NODE_VERSION=$version" >> $GITHUB_ENV
49+
echo "::set-output name=node_version::$version"
50+
3851
unit-test:
52+
needs: set-node-version
3953
strategy:
4054
matrix:
4155
os: [ubuntu-latest, windows-latest]
@@ -49,7 +63,14 @@ jobs:
4963

5064
- run: npx nx test ngx-deploy-npm --configuration="ci"
5165

52-
- if: ${{ matrix.os == 'ubuntu-latest' }}
66+
- name: Set Node.js version based on .nvmrc
67+
shell: bash
68+
run: |
69+
version=$(cat .nvmrc)
70+
echo "Setting default value for node-version parameter: $version"
71+
echo "NODE_VERSION=$version" >> $GITHUB_ENV
72+
73+
- if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == needs.set-node-version.outputs.node_version }}
5374
name: Archive coverage report
5475
uses: actions/upload-artifact@v4
5576
with:

0 commit comments

Comments
 (0)