bump 1.1.0 #18
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: Elixir CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, reopened, synchronize, ready_for_review] | |
env: | |
COMMIT_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
BRANCH: ${{ github.event_name == 'pull_request' && format('refs/heads/{0}', github.event.pull_request.head.ref) || github.ref }} | |
jobs: | |
test: | |
# This condition ensures that this job will not run on pull requests in draft state | |
if: github.event_name != 'pull_request' || !github.event.pull_request.draft | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04] | |
otp: [24, 25, 26] | |
elixir: [1.15] | |
runs-on: ${{matrix.os}} | |
name: test|OTP ${{matrix.otp}}|Elixir ${{matrix.elixir}}|${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{env.BRANCH}} | |
- uses: erlef/[email protected] | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- name: Disable compile warnings | |
run: echo "::remove-matcher owner=elixir-mixCompileWarning::" | |
- name: Retrieve mix dependencies cache | |
uses: actions/cache@v3 | |
id: mix-cache | |
with: | |
path: | | |
deps | |
_build | |
key: test-${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: test-${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.elixir }}- | |
- name: Install Dependencies | |
if: steps.mix-cache.outputs.cache-hit != 'true' | |
run: | | |
mix deps.get | |
mix deps.compile | |
- name: Compile project | |
run: mix compile --warnings-as-errors | |
- name: Run tests | |
run: mix test --cover | |
lint: | |
# This condition ensures that this job will not run on pull requests in draft state | |
if: github.event_name != 'pull_request' || !github.event.pull_request.draft | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04] | |
otp: [26] | |
elixir: [1.15] | |
runs-on: ${{matrix.os}} | |
name: lint|OTP ${{matrix.otp}}|Elixir ${{matrix.elixir}}|${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{env.BRANCH}} | |
- uses: erlef/[email protected] | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- name: Disable compile warnings | |
run: echo "::remove-matcher owner=elixir-mixCompileWarning::" | |
- name: Retrieve mix dependencies cache | |
uses: actions/cache@v3 | |
id: mix-cache | |
with: | |
path: | | |
deps | |
_build | |
key: test-${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: test-${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.elixir }}- | |
- name: Install Dependencies | |
if: steps.mix-cache.outputs.cache-hit != 'true' | |
run: | | |
mix deps.get | |
mix deps.compile | |
- name: Compile project | |
run: mix compile | |
- name: Check for unused dependencies | |
run: mix deps.unlock --check-unused | |
- name: Check formatting | |
run: mix format --check-formatted | |
- name: Check style | |
run: mix credo --strict | |
- name: Retrieve PLT cache | |
uses: actions/cache@v3 | |
id: plt-cache | |
with: | |
path: priv/plts | |
key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts- | |
- name: Create PLTs | |
run: | | |
mkdir -p priv/plts | |
mix dialyzer --plt | |
- name: Run dialyzer | |
run: mix dialyzer --format github |