Test onboarding with container and non-container builds #1
Workflow file for this run
This file contains hidden or 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
| name: Continous Integration | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| test-makefile: | |
| name: Build and test onboarding (makefile) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install golang | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23" | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Build and install the binary | |
| run: | | |
| make && sudo install -D -m 755 go-fdo-server /usr/bin/ | |
| - name: Fail if the source code has changes after build | |
| uses: NathanielHill/fail-if-changes@master | |
| - name: Build and install 'go-fdo-client' | |
| run: | | |
| source .github/scripts/fdo-utils.sh | |
| install_client | |
| - name: Test FIDO Device Onboarding | |
| run: | | |
| source .github/scripts/fdo-utils.sh | |
| test_onboarding | |
| - name: Get Manufacturer, Rendezvous and Owner server logs after a failed onboarding | |
| if: failure() | |
| run: | | |
| source .github/scripts/fdo-utils.sh | |
| get_server_logs | |
| test-container: | |
| name: Build and test onboarding (containers) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Build and spawn FDO server containers | |
| id: build-and-run-servers | |
| uses: hoverkraft-tech/compose-action@v2.3.0 | |
| with: | |
| compose-file: ".github.qkg1.toppose/servers.yaml" | |
| services-log-level: debug | |
| up-flags: "--build" | |
| - name: Make sure there are no changes after build | |
| uses: NathanielHill/fail-if-changes@master | |
| - name: Build and install 'go-fdo-client' | |
| uses: hoverkraft-tech/compose-action@v2.3.0 | |
| with: | |
| compose-file: ".github.qkg1.toppose/client.yaml" | |
| services-log-level: debug | |
| up-flags: "--build --no-start" | |
| - name: Test FIDO Device Onboarding | |
| run: | | |
| source .github/scripts/container-utils.sh | |
| test_onboarding | |
| - name: Get Manufacturer, Rendezvous and Owner server logs after a failed onboarding | |
| if: failure() && steps.build-and-run-servers.outcome == 'success' | |
| run: | | |
| source .github/scripts/container-utils.sh | |
| get_server_logs |