docs: restructure navigation into Configuration/Deployment/API/Operations/Background #10279
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: 'E2E tests' | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: | |
| - master | |
| - 'V*' | |
| # deny-all default; each job below grants only the scopes it needs | |
| permissions: {} | |
| jobs: | |
| # Docs-only changes (docs/, markdown, rst) can't affect the e2e tests. Detected once here so the | |
| # (required) e2e-test job below can skip entirely on them: that keeps the check fast and avoids | |
| # the cost of building/pushing images and running the full e2e suite for changes that can't have | |
| # broken anything it tests. A job skipped via `if:` reports as a passing check, so this still | |
| # satisfies the required status check, unlike skipping the workflow itself via a trigger-level | |
| # path filter. | |
| changes: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| outputs: | |
| code: ${{ steps.filter.outputs.code }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Check for non-doc changes | |
| id: filter | |
| uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 | |
| with: | |
| predicate-quantifier: 'some-with-excludes' | |
| filters: | | |
| code: | |
| - '**' | |
| - '!docs/**' | |
| - '!**/*.md' | |
| - '!**/*.rst' | |
| e2e-test: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.code == 'true' && (github.event.pull_request.merged || github.event.pull_request.head.repo.full_name == github.repository) }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7 | |
| with: | |
| # use go version from go.mod. | |
| go-version-file: 'go.mod' | |
| cache: false | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4 | |
| - name: Login to ghcr.io | |
| uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setting git SHA to PR head | |
| if: ${{ github.event_name == 'pull_request' }} | |
| run: echo "SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV | |
| - name: Setting git SHA to branch head | |
| if: ${{ github.event_name != 'pull_request' }} | |
| run: echo "SHA=${{ github.sha }}" >> $GITHUB_ENV | |
| - name: Build and push | |
| uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7 | |
| if: ${{ github.actor != 'dependabot' }} | |
| with: | |
| context: . | |
| file: Dockerfile | |
| platforms: linux/amd64 | |
| push: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }} | |
| tags: ghcr.io/nuts-foundation/nuts-node-ci:${{ env.SHA }} | |
| cache-from: type=gha,scope=e2e | |
| cache-to: type=gha,scope=e2e,mode=max | |
| secrets: | | |
| GIT_AUTH_TOKEN=${{ secrets.PACKAGE_SECRET }} | |
| - name: Build and push dependabot | |
| uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7 | |
| if: ${{ github.actor == 'dependabot' }} | |
| with: | |
| context: . | |
| file: Dockerfile | |
| platforms: linux/amd64 | |
| push: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }} | |
| tags: ghcr.io/nuts-foundation/nuts-node-ci:${{ env.SHA }} | |
| cache-from: type=gha,scope=e2e | |
| cache-to: type=gha,scope=e2e,mode=max | |
| - name: Run E2E tests | |
| run: | | |
| cd e2e-tests && \ | |
| find . -type f -name "docker-compose*.yml" | xargs -I{} sed -i "s~nutsfoundation/nuts-node:master~ghcr.io/nuts-foundation/nuts-node-ci:${SHA}~g" {} && \ | |
| find . -type f -name "run-test.sh" | xargs -I{} sed -i 's/docker-compose exec/docker-compose exec -T/g' {} && \ | |
| ./run-tests.sh | |
| - name: package cleanup | |
| uses: dataaxiom/ghcr-cleanup-action@d52806a0dc70b430571a37da1fde39733ffd640f # v1 | |
| continue-on-error: true # action doesn't fail when this step fails | |
| if: ${{ github.actor != 'dependabot' }} | |
| with: | |
| owner: nuts-foundation | |
| package: nuts-node-ci | |
| # NOTE: using Personal Access Token | |
| token: ${{ secrets.PACKAGE_SECRET }} | |
| keep-n-tagged: 3 | |
| - name: package cleanup dependabot | |
| uses: dataaxiom/ghcr-cleanup-action@d52806a0dc70b430571a37da1fde39733ffd640f # v1 | |
| continue-on-error: true # action doesn't fail when this step fails | |
| if: ${{ github.actor == 'dependabot' }} | |
| with: | |
| owner: nuts-foundation | |
| package: nuts-node-ci | |
| # NOTE: using Personal Access Token | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| keep-n-tagged: 3 |