Skip to content

Commit a6a34ec

Browse files
simplify gh action
1 parent 29ac67b commit a6a34ec

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

.github/workflows/pull_request.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,9 @@ jobs:
2424
matrix:
2525
test:
2626
- name: "unit"
27-
npm_script: "test:unit"
28-
- name: "integration-v5"
29-
npm_script: "test:integration"
27+
- name: "integration"
3028
cluster: "v5"
31-
- name: "integration-v4"
32-
npm_script: "test:integration"
29+
- name: "integration"
3330
cluster: "v4"
3431
steps:
3532
- name: Checkout
@@ -41,16 +38,16 @@ jobs:
4138
- name: Install Dependencies
4239
run: npm ci
4340
- name: Run ${{ matrix.test.name }} Tests
44-
run: npm run ${{ matrix.test.npm_script }} -- --ci --reporters=default --reporters=github-actions --reporters=jest-junit
41+
run: npm run test:${{ matrix.test.name }} -- --ci --reporters=default --reporters=github-actions --reporters=jest-junit
4542
env:
4643
CONDUCTOR_SERVER_URL: ${{ matrix.test.cluster == 'v4' && vars.SERVER_URL_V4 || vars.SERVER_URL }}
4744
CONDUCTOR_AUTH_KEY: ${{ matrix.test.cluster == 'v4' && secrets.AUTH_KEY_V4 || secrets.AUTH_KEY }}
4845
CONDUCTOR_AUTH_SECRET: ${{ matrix.test.cluster == 'v4' && secrets.AUTH_SECRET_V4 || secrets.AUTH_SECRET }}
49-
JEST_JUNIT_OUTPUT_NAME: ${{ matrix.test.name }}-test-results.xml
46+
JEST_JUNIT_OUTPUT_NAME: ${{ matrix.test.name }}${{ matrix.test.cluster }}-test-results.xml
5047
- name: Publish ${{ matrix.test.name }} Test Results
5148
uses: dorny/test-reporter@v2
5249
if: ${{ !cancelled() }}
5350
with:
5451
name: ${{ matrix.test.name }} Test Report
55-
path: reports/${{ matrix.test.name }}-test-results.xml
52+
path: reports/${{ matrix.test.name }}${{ matrix.test.cluster }}-test-results.xml
5653
reporter: jest-junit

0 commit comments

Comments
 (0)