mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
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.
This commit is contained in:
parent
b1cb95fe74
commit
5c74869abc
1 changed files with 6 additions and 18 deletions
24
.github/workflows/ci.yaml
vendored
24
.github/workflows/ci.yaml
vendored
|
@ -18,12 +18,12 @@ jobs:
|
||||||
cleanup-master:
|
cleanup-master:
|
||||||
name: Cleanup master build
|
name: Cleanup master build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event_name == 'schedule' }}
|
||||||
permissions:
|
permissions:
|
||||||
actions: write
|
actions: write
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Cleanup master build if necessary
|
- name: Cleanup master build if necessary
|
||||||
if: ${{ github.event_name == 'schedule' }}
|
|
||||||
run: |
|
run: |
|
||||||
gh cache delete Linux-X64-Erlang-master -R $REPO || true
|
gh cache delete Linux-X64-Erlang-master -R $REPO || true
|
||||||
gh cache delete macOS-ARM64-Erlang-master -R $REPO || true
|
gh cache delete macOS-ARM64-Erlang-master -R $REPO || true
|
||||||
|
@ -34,6 +34,7 @@ jobs:
|
||||||
check:
|
check:
|
||||||
name: Cowboy
|
name: Cowboy
|
||||||
needs: cleanup-master
|
needs: cleanup-master
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
uses: ninenines/ci.erlang.mk/.github/workflows/ci.yaml@master
|
uses: ninenines/ci.erlang.mk/.github/workflows/ci.yaml@master
|
||||||
|
|
||||||
# The examples test suite is nice to run but typically not
|
# The examples test suite is nice to run but typically not
|
||||||
|
@ -43,32 +44,19 @@ jobs:
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
name: Check examples
|
name: Check examples
|
||||||
needs: check
|
|
||||||
runs-on: 'ubuntu-latest'
|
runs-on: 'ubuntu-latest'
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Output latest Erlang/OTP version
|
- name: Install latest Erlang/OTP
|
||||||
id: latest_version
|
uses: erlef/setup-beam@v1
|
||||||
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
|
|
||||||
with:
|
with:
|
||||||
path: |
|
otp-version: latest
|
||||||
~/erlang/
|
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-Erlang-${{ steps.latest_version.outputs.latest }}
|
|
||||||
|
|
||||||
- name: Run ct-examples
|
- name: Run ct-examples
|
||||||
run: make ct-examples LATEST_ERLANG_OTP=1
|
run: make ct-examples
|
||||||
|
|
||||||
- name: Upload logs
|
- name: Upload logs
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue