From c8fc409302455f0d99df1e0ab4d5dfe66b054fc1 Mon Sep 17 00:00:00 2001 From: Edie Lemoine Date: Tue, 19 Dec 2023 10:43:31 +0100 Subject: [PATCH] build(gha): move main node version to vars --- .github/workflows/push.yml | 2 +- .github/workflows/test.yml | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e1ea12b..bef0ee4 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -24,7 +24,7 @@ jobs: - uses: myparcelnl/actions/yarn-install@v3 with: - node-version: 20 + node-version: ${{ vars.NODE_VERSION }} - name: 'Create build' run: yarn build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c5e4b5b..4d8f6c3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,8 +6,6 @@ on: jobs: test: runs-on: ubuntu-22.04 - env: - MAIN_NODE_VERSION: 20 strategy: matrix: node-version: [18, 20] @@ -28,13 +26,13 @@ jobs: shell: bash #language=sh run: | - ARGS="${{ matrix.node-version == env.MAIN_NODE_VERSION && '--coverage' || '' }}" + ARGS="${{ matrix.node-version == vars.NODE_VERSION && '--coverage' || '' }}" yarn test:run $ARGS - name: 'Upload coverage' uses: codecov/codecov-action@v3 - if: matrix.node-version == env.MAIN_NODE_VERSION + if: matrix.node-version == vars.NODE_VERSION with: files: coverage/clover.xml token: ${{ secrets.CODECOV_TOKEN }}