Skip to content

Commit a3944d7

Browse files
authored
ensure ci uses the branch name in the deployed fastly service for the starlingmonkey test app (#872)
1 parent 143c090 commit a3944d7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,9 @@ jobs:
460460
steps:
461461
- name: Checkout fastly/js-compute-runtime
462462
uses: actions/checkout@v3
463+
with:
464+
submodules: false
465+
ref: ${{ github.head_ref || github.ref_name }}
463466
- uses: actions/setup-node@v3
464467
with:
465468
node-version: 'lts/*'
@@ -499,6 +502,6 @@ jobs:
499502
- name: Yarn install
500503
run: yarn && cd ./integration-tests/js-compute && yarn
501504

502-
- run: node integration-tests/js-compute/test.js ${{ matrix.platform == 'viceroy' && '--local' || '' }}
505+
- run: SUFFIX_STRING=${{matrix.profile}} node integration-tests/js-compute/test.js ${{ matrix.platform == 'viceroy' && '--local' || '' }}
503506
env:
504507
FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}

integration-tests/js-compute/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ zx.verbose = true;
5858
const branchName = (await zx`git branch --show-current`).stdout.trim().replace(/[^a-zA-Z0-9_-]/g, '_')
5959

6060
const fixture = 'app';
61-
const serviceName = `${fixture}--${branchName}${starlingmonkey ? '--sm' : ''}`
61+
const serviceName = `${fixture}--${branchName}${starlingmonkey ? '--sm' : ''}${process.env.SUFFIX_STRING || ''}`
6262
let domain;
6363
const fixturePath = join(__dirname, 'fixtures', fixture)
6464
let localServer;

0 commit comments

Comments
 (0)