chore(deps): bump actions/cache from 3 to 4 #38
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: Test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| # max-parallel: 1 | |
| matrix: | |
| os: [ubuntu-latest] | |
| arch: [amd64, arm64, arm/v7, arm/v6, ppc64le, s390x] | |
| outputs: | |
| test_status: ${{ steps.test-result.outcome }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| with: | |
| platforms: all | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| with: | |
| driver: docker-container | |
| # Cache Alpine Base Images | |
| - name: Cache Docker Base Images | |
| id: cache-docker-images | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: docker-base-images-${{ matrix.arch }}-${{ runner.os }}-${{ hashFiles('Dockerfile') }} | |
| restore-keys: | | |
| docker-base-images-${{ matrix.arch }}-${{ runner.os }}- | |
| # Pre-fetch Alpine Base Images | |
| - name: Preload Base Images | |
| if: steps.cache-docker-images.outputs.cache-hit != 'true' | |
| run: | | |
| docker pull --platform linux/${{ matrix.arch }} alpine:3.19 | |
| docker pull --platform linux/${{ matrix.arch }} alpine:3.20 | |
| docker pull --platform linux/${{ matrix.arch }} alpine:3.21 | |
| docker pull --platform linux/${{ matrix.arch }} alpine:latest | |
| - name: Install Docker Compose | |
| uses: docker/setup-buildx-action@v2 | |
| # Cache Docker Compose | |
| - name: Cache Docker Compose | |
| id: cache-compose | |
| uses: actions/cache@v4 | |
| with: | |
| path: /usr/local/bin/docker-compose | |
| key: compose-${{ runner.os }}-v2.19.1 | |
| - name: Install Docker Compose (if not cached) | |
| if: steps.cache-compose.outputs.cache-hit != 'true' | |
| run: | | |
| sudo curl -L "https://github.com/docker/compose/releases/download/v2.19.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
| sudo chmod +x /usr/local/bin/docker-compose | |
| - name: Create .env File | |
| run: | | |
| echo "Generating .env file..." | |
| cat <<EOF > .env | |
| DUCKDNSTOKEN=${{ secrets.DUCKDNSTOKEN }} | |
| CONFIG_ONLY_TEST_USER_PASS=${{ secrets.CONFIG_ONLY_TEST_USER_PASS }} | |
| CONFIG_ONLY_SSL_TEST_USER1_PASS=${{ secrets.CONFIG_ONLY_SSL_TEST_USER1_PASS }} | |
| CONFIG_ONLY_SSL_TEST_USER2_PASS=${{ secrets.CONFIG_ONLY_SSL_TEST_USER2_PASS }} | |
| ENV_OVERRIDE_TEST_USER1_PASS=${{ secrets.ENV_OVERRIDE_TEST_USER1_PASS }} | |
| ENV_OVERRIDE_TEST_USER2_PASS=${{ secrets.ENV_OVERRIDE_TEST_USER2_PASS }} | |
| ENV_OVERRIDE_SSL_TEST_USER1_PASS=${{ secrets.ENV_OVERRIDE_SSL_TEST_USER1_PASS }} | |
| ENV_OVERRIDE_SSL_TEST_USER2_PASS=${{ secrets.ENV_OVERRIDE_SSL_TEST_USER2_PASS }} | |
| EOF | |
| - name: Run Tests with Retry for arm/v6 | |
| id: test-result | |
| env: | |
| LOG_LEVEL: ${{ vars.LOG_LEVEL }} | |
| run: | | |
| echo "Running tests on architecture: ${{ matrix.arch }}" | |
| LOG_LEVEL=DEBUG bash tests/run-tests.sh |