Skip to content

Commit 94e676d

Browse files
add test to CI
1 parent 40c027a commit 94e676d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/integration-test-workflow.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ on:
1414
working-directory:
1515
required: false
1616
type: string
17-
17+
workflow-id:
18+
required: true
19+
type: string
1820
jobs:
1921
main:
2022
runs-on: ${{ inputs.runs-on }}
@@ -43,6 +45,7 @@ jobs:
4345
uses: ./
4446
with:
4547
main-branch-name: ${{ inputs.main-branch-name }}
48+
workflow-id: ${{ inputs.workflow-id }}
4649

4750
- name: Verify default PR Workflow
4851
if: ${{ github.event_name == 'pull_request' }}
@@ -63,3 +66,10 @@ jobs:
6366
HEAD_SHA=$(echo $(git rev-parse HEAD))
6467
node -e "if(process.env.NX_BASE == '${BASE_SHA}') console.log('Base set correctly'); else { throw new Error('Base not set correctly!');}"
6568
node -e "if(process.env.NX_HEAD == '${HEAD_SHA}') console.log('Head set correctly'); else { throw new Error('Head not set correctly!');}"
69+
70+
- name: Verify workflow-id
71+
if: ${{ inputs.workflow-id != '' }}
72+
run: |
73+
echo "NX_BASE: $NX_BASE"
74+
echo "NX_HEAD: $NX_HEAD"
75+
echo "NX_WORKFLOW_ID: $NX_WORKFLOW_ID"

.github/workflows/test-integration.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16-
test:
16+
test-integration:
1717
name: Test workflow integration
1818
strategy:
1919
matrix:
@@ -24,3 +24,4 @@ jobs:
2424
working-directory: integration-test
2525
main-branch-name: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}
2626
runs-on: ${{ matrix.runs-on }}
27+
workflow-id: foo-bar

0 commit comments

Comments
 (0)