Skip to content

Commit fc29227

Browse files
simplify github action, update npm commands
1 parent 5bbed6c commit fc29227

2 files changed

Lines changed: 14 additions & 15 deletions

File tree

.github/workflows/pull_request.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ jobs:
2424
matrix:
2525
test:
2626
- name: "unit"
27-
- name: "integration"
28-
cluster: "v5"
29-
- name: "integration"
30-
cluster: "v4"
27+
- name: "integration:v5"
28+
- name: "integration:v4"
3129
steps:
3230
- name: Checkout
3331
uses: actions/checkout@v4
@@ -37,17 +35,17 @@ jobs:
3735
node-version: "22"
3836
- name: Install Dependencies
3937
run: npm ci
40-
- name: Run ${{ matrix.test.name }}${{ matrix.test.cluster }} Tests and Add Annotations
41-
run: npm run test:${{ matrix.test.name }} -- --ci --reporters=default --reporters=github-actions --reporters=jest-junit
38+
- name: Run ${{matrix.test.name}} Tests and Add Annotations
39+
run: npm run test:${{matrix.test.name}} -- --ci --reporters=default --reporters=github-actions --reporters=jest-junit
4240
env:
43-
CONDUCTOR_SERVER_URL: ${{ matrix.test.cluster == 'v4' && vars.SERVER_URL_V4 || vars.SERVER_URL }}
44-
CONDUCTOR_AUTH_KEY: ${{ matrix.test.cluster == 'v4' && secrets.AUTH_KEY_V4 || secrets.AUTH_KEY }}
45-
CONDUCTOR_AUTH_SECRET: ${{ matrix.test.cluster == 'v4' && secrets.AUTH_SECRET_V4 || secrets.AUTH_SECRET }}
46-
JEST_JUNIT_OUTPUT_NAME: ${{ matrix.test.name }}${{ matrix.test.cluster }}-test-results.xml
47-
- name: Publish ${{ matrix.test.name }} Test Results
41+
CONDUCTOR_SERVER_URL: ${{matrix.test.name == 'integration:v4' && vars.SERVER_URL_V4 || vars.SERVER_URL}}
42+
CONDUCTOR_AUTH_KEY: ${{matrix.test.name == 'integration:v4' && secrets.AUTH_KEY_V4 || secrets.AUTH_KEY}}
43+
CONDUCTOR_AUTH_SECRET: ${{matrix.test.name == 'integration:v4' && secrets.AUTH_SECRET_V4 || secrets.AUTH_SECRET}}
44+
JEST_JUNIT_OUTPUT_NAME: ${{matrix.test.name}}-test-results.xml
45+
- name: Publish ${{matrix.test.name}} Test Results
4846
uses: dorny/test-reporter@v2
49-
if: ${{ !cancelled() }}
47+
if: ${{!cancelled()}}
5048
with:
51-
name: ${{ matrix.test.name }} Test Report
52-
path: reports/${{ matrix.test.name }}${{ matrix.test.cluster }}-test-results.xml
49+
name: ${{matrix.test.name}} Test Report
50+
path: reports/${{matrix.test.name}}-test-results.xml
5351
reporter: jest-junit

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"lint-fix": "npx eslint . --fix",
4848
"test": "jest --force-exit --detectOpenHandles",
4949
"test:unit": "jest --testMatch='**/src/**/__tests__/**/*.test.[jt]s?(x)' --force-exit",
50-
"test:integration": "jest --testMatch='**/integration-tests/**/*.test.[jt]s?(x)' --force-exit --detectOpenHandles",
50+
"test:integration:v5": "jest --testMatch='**/integration-tests/{common,v5-only}/**/*.test.[jt]s?(x)' --force-exit --detectOpenHandles",
51+
"test:integration:v4": "jest --testMatch='**/integration-tests/common/**/*.test.[jt]s?(x)' --force-exit --detectOpenHandles",
5152
"ci": "npm run lint && npm run test",
5253
"build": "tsup index.ts",
5354
"generateClient:models": "npx openapi-typescript-codegen --input http://localhost:8080/api-docs --output src/common/open-api --client node --indent 2 --name ConductorClient --useUnionTypes --exportCore false",

0 commit comments

Comments
 (0)