Bump CI to OTP 27 #1182
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 & Lint | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
# Only run lint and formatting jobs on latest OTP/Elixir versions. | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: 27 | |
elixir-version: 1.17 | |
- uses: actions/cache@v4 | |
env: | |
base-key: 27-1.17 | |
with: | |
path: | | |
_build | |
deps | |
# Generate a hash of the OTP version and Elixir version | |
key: ${{ env.base-key }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ env.base-key }}-mix | |
- run: mix deps.get | |
name: Fetch Dependencies | |
- run: mix credo --strict | |
name: Lint (credo) | |
- run: mix format --check-formatted | |
name: Lint (mix format) | |
- run: mix dialyzer | |
name: Run dialyzer | |
test: | |
name: Run Unit tests | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
elixir-version: ['1.14', '1.15', '1.16', '1.17'] | |
otp-version: ['25', '26', '27'] | |
exclude: | |
- elixir-version: '1.14' | |
otp-version: '27' | |
- elixir-version: '1.15' | |
otp-version: '27' | |
- elixir-version: '1.16' | |
otp-version: '27' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp-version }} | |
elixir-version: ${{ matrix.elixir-version }} | |
- uses: actions/cache@v4 | |
with: | |
path: _build | |
# Generate a hash of the OTP version and Elixir version | |
key: ${{ matrix.otp-version }}-${{ matrix.elixir-version }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
restore-keys: ${{ matrix.otp-version }}-${{ matrix.elixir-version }}-mix | |
- run: mix deps.get | |
name: Fetch Dependencies | |
- run: mix test --no-start | |
name: Run Tests |