diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index af3fba9dac..f2c28d3c9d 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -8,7 +8,7 @@ on: env: ARTILLERY_BINARY_PATH: ${{ github.workspace }}/packages/artillery/bin/run - CLI_TAGS: repo:${{ github.repository }},actor:${{ github.actor }},type:smoke,ci:true + CLI_TAGS: repo:${{ github.repository }},actor:${{ github.actor }},type:smoke,ci:true,commit:${{ github.sha }} CLI_NOTE: Running from the Official Artillery Github Action! ðŸ˜€ jobs: diff --git a/.github/workflows/run-aws-tests.yml b/.github/workflows/run-aws-tests.yml index ddc23ce17a..dd248b418e 100644 --- a/.github/workflows/run-aws-tests.yml +++ b/.github/workflows/run-aws-tests.yml @@ -52,6 +52,7 @@ jobs: ARTILLERY_CLOUD_API_KEY: ${{ secrets.ARTILLERY_CLOUD_API_KEY_TEST }} GITHUB_REPO: ${{ github.repository }} GITHUB_ACTOR: ${{ github.actor }} + GITHUB_SHA: ${{ github.event.pull_request.head.sha || github.sha }} steps: - uses: actions/checkout@v3 with: @@ -77,4 +78,4 @@ jobs: - run: npm run test:aws --workspace artillery-engine-playwright env: - FORCE_COLOR: 1 \ No newline at end of file + FORCE_COLOR: 1 diff --git a/packages/artillery/test/cli/_helpers.js b/packages/artillery/test/cli/_helpers.js index da40f4f672..e2179dc508 100644 --- a/packages/artillery/test/cli/_helpers.js +++ b/packages/artillery/test/cli/_helpers.js @@ -43,8 +43,13 @@ function getTestTags(additionalTags) { const actorTag = `actor:${process.env.GITHUB_ACTOR || 'localhost'}`; const repoTag = `repo:${process.env.GITHUB_REPO || 'artilleryio/artillery'}`; const ciTag = `ci:${process.env.GITHUB_ACTIONS ? 'true' : 'false'}`; + const baseTags = [repoTag, actorTag, ciTag]; - return `${repoTag},${actorTag},${ciTag},${additionalTags.join(',')}`; + if (process.env.GITHUB_SHA) { + baseTags.push(`commit:${process.env.GITHUB_SHA}`); + } + + return `${[...baseTags, ...additionalTags].join(',')}`; } module.exports = {