Skip to content

Execute OTP-specific ex_doc (from priv) #246

Execute OTP-specific ex_doc (from priv)

Execute OTP-specific ex_doc (from priv) #246

Workflow file for this run

---
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: '27.0-rc1'
elixir: '1.16'
rebar3: '3.22.1'
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:
pair:
- otp: '24'
elixir: '1.13'
- otp: '25'
elixir: '1.14'
- otp: '26'
elixir: '1.15'
- otp: '27.0-rc1'
elixir: '1.16'
steps:
- name: Setup Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.pair.otp}}
elixir-version: ${{matrix.pair.elixir}}
- name: Checkout code
uses: actions/checkout@v4
- name: Restore/cache for consumption # We do this to use the file in a non-Elixir env.
uses: actions/cache@v4
with:
path: priv/ex_doc_otp
key: consumer-ex_doc-cache
- name: Build ex_doc
run: |
mix deps.get
mix escript.build
consumer:
name: "Consumer: Erlang/OTP ${{matrix.otp}} / rebar3 ${{matrix.rebar3}}"
runs-on: ubuntu-latest
needs: gen_ex_doc
strategy:
matrix:
otp: ['24', '25', '26', '27.0-rc1']
rebar3: ['3.22.1']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Restore for consumption # We do this to use the file in a non-Elixir env.
uses: actions/cache/restore@v4
with:
path: priv/ex_doc_otp
key: consumer-ex_doc-cache
- name: Setup Erlang
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
rebar3-version: ${{matrix.rebar3}}
- name: Eat your own dog food
run: |
cd examples/mylib
rebar3 ex_doc # test that generation happens without errors