Allow for a control issue to let us know when CI's failing #260
Workflow file for this run
This file contains 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: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
test: | |
name: Erlang/OTP ${{matrix.triplet.otp}} / rebar3 ${{matrix.triplet.rebar3}} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
triplet: | |
- otp: '24' | |
elixir: '1.13' | |
rebar3: '3.22.1' | |
- otp: '25' | |
elixir: '1.14' | |
rebar3: '3.22.1' | |
- otp: '26' | |
elixir: '1.15' | |
rebar3: '3.22.1' | |
- otp: 'master' | |
elixir: 'main' | |
rebar3: 'nightly' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.triplet.otp}} | |
elixir-version: ${{matrix.triplet.elixir}} | |
rebar3-version: ${{matrix.triplet.rebar3}} | |
- name: Static analysis | |
run: rebar3 dialyzer | |
- name: Common Tests | |
run: rebar3 ct | |
gen_ex_doc: | |
name: Generate `ex_doc` for `priv` | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
matrix: | |
triplet: | |
- otp: '24' | |
elixir: '1.13' | |
cache-id: oldest | |
- otp: '25' | |
elixir: '1.14' | |
cache-id: plus_one | |
- otp: '26' | |
elixir: '1.15' | |
cache-id: plus_two | |
- otp: 'master' | |
elixir: 'main' | |
cache-id: plus_three | |
steps: | |
- name: Setup Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.triplet.otp}} | |
elixir-version: ${{matrix.triplet.elixir}} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build ex_doc | |
run: | | |
mix deps.get | |
mix escript.build | |
- name: Save cache for consumption # We do this to use the file in a non-Elixir env. | |
uses: actions/cache/save@v4 | |
with: | |
path: priv | |
key: consumer-cache-${{matrix.triplet.cache-id}} | |
consumer: | |
name: "Consumer: Erlang/OTP ${{matrix.pair.otp}} / rebar3 ${{matrix.pair.rebar3}}" | |
runs-on: ubuntu-latest | |
needs: gen_ex_doc | |
strategy: | |
matrix: | |
pair: | |
- otp: '24' | |
rebar3: '3.22.1' | |
- otp: '25' | |
rebar3: '3.22.1' | |
- otp: '26' | |
rebar3: '3.22.1' | |
- otp: 'master' | |
rebar3: 'nightly' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Restore cache (oldest) # We do this to use the file in a non-Elixir env. | |
uses: actions/cache/restore@v4 | |
with: | |
path: priv | |
key: consumer-cache-oldest | |
- name: Restore cache (plus_one) | |
uses: actions/cache/restore@v4 | |
with: | |
path: priv | |
key: consumer-cache-plus_one | |
- name: Restore cache (plus_two) | |
uses: actions/cache/restore@v4 | |
with: | |
path: priv | |
key: consumer-cache-plus_two | |
- name: Restore cache (plus_three) | |
uses: actions/cache/restore@v4 | |
with: | |
path: priv | |
key: consumer-cache-plus_three | |
- name: Setup Erlang | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.pair.otp}} | |
rebar3-version: ${{matrix.pair.rebar3}} | |
- name: Eat your own dog food | |
run: | | |
cd examples/mylib | |
rebar3 ex_doc # test that generation happens without errors |