deno.land / x / oauth4webapi@v1.2.2 / .github / workflows / conformance.yml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203name: Conformance Checks
on: push: pull_request: schedule: - cron: '47 11 * * 1' workflow_dispatch: inputs: conformance-version: description: 'Conformance Suite Version (commit hash)' required: false
jobs: build-conformance-suite: runs-on: ubuntu-latest outputs: cache-key: ${{ steps.cache-key.outputs.value }} steps: - name: Checkout uses: actions/checkout@master - name: Set Conformance Suite Version from GitLab if: ${{ !github.event.inputs.conformance-version }} run: | export VERSION=($(curl --silent "https://gitlab.com/api/v4/projects/4175605/releases" | jq -r '.[0].tag_name')) echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Set Conformance Suite Version from Workflow Dispatch if: ${{ github.event.inputs.conformance-version }} run: | echo "VERSION=${{ github.event.inputs.conformance-version }}" >> $GITHUB_ENV - id: cache-key run: echo "value=suite-${{ hashFiles('.github/workflows/conformance.yml') }}-${{ env.VERSION }}" >> $GITHUB_OUTPUT - name: Load Cached Conformance Suite Build uses: actions/cache@v3 id: cache with: path: ./conformance-suite key: ${{ steps.cache-key.outputs.value }} - run: | echo "### Conformance Suite Details" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "Version: **${{ env.VERSION }}**" >> $GITHUB_STEP_SUMMARY echo "Cache Key: **${{ steps.cache-key.outputs.value }}**" >> $GITHUB_STEP_SUMMARY echo "Cache Hit: **${{ steps.cache.outputs.cache-hit || false }}**" >> $GITHUB_STEP_SUMMARY - name: Conformance Suite Checkout if: ${{ steps.cache.outputs.cache-hit != 'true' }} run: git clone https://gitlab.com/openid/conformance-suite.git - run: git reset --hard ${{ env.VERSION }} working-directory: ./conformance-suite - name: Conformance Suite Build working-directory: ./conformance-suite if: ${{ steps.cache.outputs.cache-hit != 'true' }} env: MAVEN_CACHE: ./m2 run: | sed -i -e 's/localhost/localhost.emobix.co.uk/g' src/main/resources/application.properties sed -i -e 's/-B clean/-B -DskipTests=true/g' builder-compose.yml docker-compose -f builder-compose.yml run builder
conformance-suite: runs-on: ubuntu-latest needs: - build-conformance-suite continue-on-error: ${{ matrix.beta-plan || false }} strategy: fail-fast: false matrix: include: # FAPI 2.0 OpenID Connect - beta-plan: true setup: plan: fapi2-baseline-id2-client-test-plan
# FAPI 2.0 OAuth 2.0 - beta-plan: true setup: variant: fapi_jarm_type: 'plain_oauth' plan: fapi2-baseline-id2-client-test-plan
# FAPI 2.0 Message Signing - OpenID Connect - beta-plan: true setup: plan: fapi2-advanced-id1-client-test-plan
# FAPI 2.0 Message Signing - OAuth 2.0 - beta-plan: true setup: variant: fapi_jarm_type: 'plain_oauth' plan: fapi2-advanced-id1-client-test-plan
setup: # Core 1.0 Basic - plan: oidcc-client-basic-certification-test-plan
# client_secret_basic - variant: client_auth_type: client_secret_basic plan: oidcc-client-test-plan
# client_secret_post - variant: client_auth_type: client_secret_post plan: oidcc-client-test-plan
# request_object - variant: request_type: request_object plan: oidcc-client-test-plan
# private_key_jwt - variant: client_auth_type: private_key_jwt plan: oidcc-client-test-plan
# none - variant: client_auth_type: none plan: oidcc-client-test-plan
# ES256 - algorithm: ES256 plan: oidcc-client-test-plan variant: request_type: request_object client_auth_type: private_key_jwt
# RS256 - algorithm: RS256 plan: oidcc-client-test-plan variant: request_type: request_object client_auth_type: private_key_jwt
# PS256 - algorithm: PS256 plan: oidcc-client-test-plan variant: request_type: request_object client_auth_type: private_key_jwt
# EdDSA - algorithm: EdDSA plan: oidcc-client-test-plan variant: request_type: request_object client_auth_type: private_key_jwt
steps: - name: Checkout uses: actions/checkout@master - name: Load Cached Conformance Suite Build uses: actions/cache@v3 id: cache with: path: ./conformance-suite key: ${{ needs.build-conformance-suite.outputs.cache-key }} - name: Abort if Conformance Suite isn't cached if: ${{ steps.cache.outputs.cache-hit != 'true' }} uses: actions/github-script@v6 with: script: | core.setFailed('Conformance Suite cache hit failed') - name: Run Conformance Suite working-directory: ./conformance-suite run: | docker-compose -f docker-compose-dev.yml up -d while ! curl -skfail https://localhost.emobix.co.uk:8443/api/runner/available >/dev/null; do sleep 2; done - name: Setup node uses: actions/setup-node@v3 with: node-version: 18 # lts/hydrogen cache: 'npm' check-latest: true - run: npm clean-install - name: npm run conformance run: | set -o pipefail npm run conformance | tee capture.txt env: NODE_TLS_REJECT_UNAUTHORIZED: 0 SUITE_BASE_URL: https://localhost.emobix.co.uk:8443 PLAN_NAME: ${{ matrix.setup.plan }} VARIANT: ${{ toJSON(matrix.setup.variant) }} JWS_ALGORITHM: ${{ matrix.setup.algorithm }} - if: ${{ success() }} run: echo "### :tada:" >> $GITHUB_STEP_SUMMARY - if: ${{ failure() }} run: echo "### :exclamation:" >> $GITHUB_STEP_SUMMARY - run: node ./conformance/.parse-logs.mjs capture.txt - run: rm capture.txt - name: Upload test artifacts uses: actions/upload-artifact@v3 with: path: | *.zip *.txt name: conformance results if-no-files-found: error if: ${{ always() }}
Version Info