diff options
author | Loïc Hoguin <[email protected]> | 2024-11-08 12:02:40 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2024-11-08 12:13:23 +0100 |
commit | 5c74869abcd7a7314daf94fef26400bb1f8baaa1 (patch) | |
tree | d0607f5ec9a17d859d1e36c5aa4de5df65d1d44f /.github | |
parent | b1cb95fe743156e394ecfbc65df0faed86c36886 (diff) | |
download | cowboy-5c74869abcd7a7314daf94fef26400bb1f8baaa1.tar.gz cowboy-5c74869abcd7a7314daf94fef26400bb1f8baaa1.tar.bz2 cowboy-5c74869abcd7a7314daf94fef26400bb1f8baaa1.zip |
CI: Simplify testing for examples
Since we only test them on Ubuntu we can use setup-beam
to install Erlang/OTP and avoid waiting for all other
checks to complete.
Also make the "delete master" job conditional rather
than only its step.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yaml | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e79bc91..e4c6389 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,12 +18,12 @@ jobs: cleanup-master: name: Cleanup master build runs-on: ubuntu-latest + if: ${{ github.event_name == 'schedule' }} permissions: actions: write steps: - name: Cleanup master build if necessary - if: ${{ github.event_name == 'schedule' }} run: | gh cache delete Linux-X64-Erlang-master -R $REPO || true gh cache delete macOS-ARM64-Erlang-master -R $REPO || true @@ -34,6 +34,7 @@ jobs: check: name: Cowboy needs: cleanup-master + if: ${{ !cancelled() }} uses: ninenines/ci.erlang.mk/.github/workflows/ci.yaml@master # The examples test suite is nice to run but typically not @@ -43,32 +44,19 @@ jobs: examples: name: Check examples - needs: check runs-on: 'ubuntu-latest' - if: ${{ !cancelled() }} steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Output latest Erlang/OTP version - id: latest_version - run: | - { - echo "latest<<EOF" - make ci-list | grep -v rc | grep -v master | tail -n1 - echo EOF - } >> "$GITHUB_OUTPUT" - - - name: Restore CI cache - uses: actions/cache/restore@v4 + - name: Install latest Erlang/OTP + uses: erlef/setup-beam@v1 with: - path: | - ~/erlang/ - key: ${{ runner.os }}-${{ runner.arch }}-Erlang-${{ steps.latest_version.outputs.latest }} + otp-version: latest - name: Run ct-examples - run: make ct-examples LATEST_ERLANG_OTP=1 + run: make ct-examples - name: Upload logs uses: actions/upload-artifact@v4 |