diff --git a/.github/workflows/axon-tools-tests.yml b/.github/workflows/axon-tools-tests.yml index 5bbd1847..b2aa686e 100644 --- a/.github/workflows/axon-tools-tests.yml +++ b/.github/workflows/axon-tools-tests.yml @@ -26,6 +26,11 @@ 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" + echo "CI_BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> "$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..63c89f39 100644 --- a/packages/mdctl-axon-tools/jest.config.js +++ b/packages/mdctl-axon-tools/jest.config.js @@ -23,11 +23,11 @@ module.exports = { filename: 'report.html', stripSkippedTest: true, customInfos: [{ - title: 'Ref', - value: process.env.GITHUB_REF_NAME + title: 'Branch', + value: process.env.CI_BRANCH }, { title: 'Commit #', - value: process.env.GITHUB_SHA + value: process.env.CI_COMMIT_SHORT_SHA }] }]]