chore: update GitHub Actions #117
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: | |
branches: [ master ] | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
otp_version: ['24', '25', '26'] | |
elixir_version: ['1.14', '1.15', '1.16'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp_version }} | |
elixir-version: ${{ matrix.elixir_version }} | |
- name: Restore dependencies cache | |
uses: actions/cache@v3 | |
with: | |
path: deps | |
key: ${{ runner.os }}-otp-${{ matrix.otp_version }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-otp-${{ matrix.otp_version }}-mix- | |
- name: Install dependencies | |
run: mix do deps.get, deps.compile | |
- name: Run tests | |
run: mix test --cover | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.xml | |
flags: elixir-${{ matrix.elixir_version }},otp-${{ matrix.otp_version }} |