From 7a4bcd6f3928703b1ef28d041bec5ef3680203aa Mon Sep 17 00:00:00 2001 From: Ala Hawash Date: Wed, 13 Mar 2024 00:03:12 +0200 Subject: [PATCH] add ENV variables --- .github/workflows/axon-tools-tests.yml | 4 ++++ packages/mdctl-axon-tools/jest.config.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/axon-tools-tests.yml b/.github/workflows/axon-tools-tests.yml index 5bbd1847..753c5c59 100644 --- a/.github/workflows/axon-tools-tests.yml +++ b/.github/workflows/axon-tools-tests.yml @@ -26,6 +26,10 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' + - name: Set ENV variables + id: vars + run: | + echo "CI_COMMIT_SHORT_SHA=$(git rev-parse --short ${{ github.sha }})" >> "$GITHUB_ENV" - run: npm ci - run: npm run test --workspace=@medable/mdctl-axon-tools - uses: actions/upload-artifact@v4 diff --git a/packages/mdctl-axon-tools/jest.config.js b/packages/mdctl-axon-tools/jest.config.js index 6e9dfb05..2a607dc6 100644 --- a/packages/mdctl-axon-tools/jest.config.js +++ b/packages/mdctl-axon-tools/jest.config.js @@ -24,10 +24,10 @@ module.exports = { stripSkippedTest: true, customInfos: [{ title: 'Ref', - value: process.env.GITHUB_REF_NAME + value: process.env.GITHUB_HEAD_REF }, { title: 'Commit #', - value: process.env.GITHUB_SHA + value: process.env.CI_COMMIT_SHORT_SHA }] }]]