Skip to content

Commit 06adc6c

Browse files
committed
ci: add e2e test to on-pr workflow
1 parent 427093f commit 06adc6c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/on-pull-request.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,41 @@ jobs:
5050
run: go test ./...
5151
- name: Test with race detector
5252
run: go test -race -run TestAppJWKSCacheWriteConcurrency
53+
test-e2e:
54+
name: Test E2E
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions-cool/check-user-permission@v2
58+
with:
59+
require: write
60+
id: check_permission
61+
- name: Get SDK version
62+
id: get_sdk_version
63+
if: ${{ steps.check_permission.outputs.require-result == 'true' }}
64+
run: |
65+
line=$(head -n 1 go.mod)
66+
go_mod_version=${line##*/v}
67+
manifest_version=$(jq -r '."."' .release-please-manifest.json | cut -d. -f1)
68+
69+
version=''
70+
if [[ $go_mod_version -gt $manifest_version ]]; then
71+
version=$go_mod_version
72+
fi
73+
74+
echo "version=$version" >> $GITHUB_OUTPUT
75+
- name: Trigger E2E Workflow in backend-sdk-tests and Wait
76+
if: ${{ steps.check_permission.outputs.require-result == 'true' }}
77+
uses: convictional/[email protected]
78+
with:
79+
owner: passageidentity
80+
repo: backend-sdk-tests
81+
workflow_file_name: integration-tests-complete.yml
82+
github_token: ${{ secrets.BE_SDK_PAT }}
83+
# github.head_ref is only available on PR events, while github.ref_name provides the branch name on other events
84+
client_payload: >-
85+
{
86+
"target_sdk":"go",
87+
"use_test_release":true,
88+
"sdk_branch_ref":"${{ github.head_ref || github.ref_name }}",
89+
"test_release_version":"${{ steps.get_sdk_version.outputs.version }}"
90+
}

0 commit comments

Comments
 (0)