From 0c93700ce653bad4c5de85a287c21ce8d8c53d5f Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Fri, 13 Sep 2024 12:59:29 +1200 Subject: [PATCH] Fix test matrix. --- .github/workflows/test-coverage.yaml | 4 +- .github/workflows/test-external.yaml | 3 ++ .github/workflows/test-proxy.yaml | 59 ++++++++++++++++++++++++++++ .github/workflows/test.yaml | 3 ++ 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-proxy.yaml diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index ffa0927..c41019f 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -18,7 +18,6 @@ jobs: matrix: os: - ubuntu - - macos ruby: - "3.3" @@ -32,6 +31,9 @@ jobs: - name: Run tests timeout-minutes: 5 + env: + CLOUDFLARE_EMAIL: ${{secrets.CLOUDFLARE_EMAIL}} + CLOUDFLARE_KEY: ${{secrets.CLOUDFLARE_KEY}} run: bundle exec bake test - uses: actions/upload-artifact@v4 diff --git a/.github/workflows/test-external.yaml b/.github/workflows/test-external.yaml index 21898f5..fd8acc1 100644 --- a/.github/workflows/test-external.yaml +++ b/.github/workflows/test-external.yaml @@ -33,4 +33,7 @@ jobs: - name: Run tests timeout-minutes: 10 + env: + CLOUDFLARE_EMAIL: ${{secrets.CLOUDFLARE_EMAIL}} + CLOUDFLARE_KEY: ${{secrets.CLOUDFLARE_KEY}} run: bundle exec bake test:external diff --git a/.github/workflows/test-proxy.yaml b/.github/workflows/test-proxy.yaml new file mode 100644 index 0000000..199f673 --- /dev/null +++ b/.github/workflows/test-proxy.yaml @@ -0,0 +1,59 @@ +name: Test + +on: [push, pull_request] + +permissions: + contents: read + +env: + CONSOLE_OUTPUT: XTerm + +jobs: + test: + name: ${{matrix.ruby}} on ${{matrix.os}} + runs-on: ${{matrix.os}}-latest + continue-on-error: ${{matrix.experimental}} + + strategy: + matrix: + os: + - ubuntu + - macos + + ruby: + - "3.1" + - "3.2" + - "3.3" + + experimental: [false] + + include: + - os: ubuntu + ruby: truffleruby + experimental: true + - os: ubuntu + ruby: jruby + experimental: true + - os: ubuntu + ruby: head + experimental: true + + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{matrix.ruby}} + bundler-cache: true + + - name: Prepare squid + run: | + sudo apt-get install squid + sudo systemctl start squid + + - name: Run tests + timeout-minutes: 10 + env: + CLOUDFLARE_PROXY: http://localhost:3128 + CLOUDFLARE_EMAIL: ${{secrets.CLOUDFLARE_EMAIL}} + CLOUDFLARE_KEY: ${{secrets.CLOUDFLARE_KEY}} + run: bundle exec bake test diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0769a98..fc60b8e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -47,4 +47,7 @@ jobs: - name: Run tests timeout-minutes: 10 + env: + CLOUDFLARE_EMAIL: ${{secrets.CLOUDFLARE_EMAIL}} + CLOUDFLARE_KEY: ${{secrets.CLOUDFLARE_KEY}} run: bundle exec bake test