-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI/CD: add jobs for client_integration_test
- Loading branch information
Showing
2 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Integration test | ||
description: Runs the tests in ./internal/sessiontest/client_integration_test.go against the given IRMA server and keyshare server artifacts. | ||
inputs: | ||
ref: | ||
description: The branch, tag or SHA to check out | ||
required: true | ||
irma-server-artifact: | ||
description: Artifact URL or id of the irma server artifact to use | ||
required: true | ||
keyshare-server-artifact: | ||
description: Artifact URL or id of the keyshare server artifact to use | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ^1.18 | ||
|
||
- name: Checkout irmago | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: Download IRMA server artifact (URL) | ||
if: startsWith(inputs.irma-server-artifact, 'https://') | ||
run: curl --create-dirs -L -o ./bin-is/irma-linux-amd64 ${{ inputs.irma-server-artifact }} | ||
shell: bash | ||
|
||
- name: Download IRMA server artifact (artifact id) | ||
if: ${{ !startsWith(inputs.irma-server-artifact, 'https://') }} | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ inputs.irma-server-artifact }} | ||
path: bin-is | ||
|
||
- name: Set file permissions for bin-is | ||
run: chmod +x ./bin-is/irma-linux-amd64 | ||
shell: bash | ||
|
||
- name: Download keyshare server artifact (URL) | ||
if: startsWith(inputs.keyshare-server-artifact, 'https://') | ||
run: curl --create-dirs -L -o ./bin-ks/irma-linux-amd64 ${{ inputs.keyshare-server-artifact }} | ||
shell: bash | ||
|
||
- name: Download keyshare server artifact (artifact id) | ||
if: ${{ !startsWith(inputs.keyshare-server-artifact, 'https://') }} | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ inputs.keyshare-server-artifact }} | ||
path: bin-ks | ||
|
||
- name: Set file permissions for bin-ks | ||
run: chmod +x ./bin-ks/irma-linux-amd64 | ||
shell: bash | ||
|
||
- name: Run keyshare server utilities | ||
run: docker-compose run postgres-init | ||
shell: bash | ||
|
||
# We add & at the end of each command to run them in the background. | ||
- name: Run IRMA server | ||
run: ./bin-is/irma-linux-amd64 server -s testdata/irma_configuration --url http://localhost:port -p 48682 -k testdata/privatekeys & | ||
shell: bash | ||
|
||
- name: Run keyshare server | ||
run: ./bin-ks/irma-linux-amd64 keyshare server -c testdata/configurations/keyshareserver.yml & | ||
shell: bash | ||
|
||
- name: Wait until IRMA server and keyshare server are up | ||
run: sleep 5 | ||
shell: bash | ||
|
||
- name: Run integration tests | ||
run: go test -v --tags=integration_tests -run TestClientIntegration ./... | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters