Skip to content

Commit

Permalink
Fix build matrix and separate coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed Oct 4, 2024
1 parent 60ce739 commit 464441e
Showing 1 changed file with 38 additions and 4 deletions.
42 changes: 38 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ jobs:
strategy:
matrix:
elixir:
- 1.15-25
- 1.15-26
- 1.15-27
- 1.16-25
- 1.16-26
- 1.16-27
- 1.17-25
- 1.17-26
- 1.17-27
env:
Expand Down Expand Up @@ -44,8 +45,8 @@ jobs:
run: mix credo --strict
env:
MIX_ENV: test
- name: Run Tests & Coverage Analysis
run: mix coveralls.github --trace
- name: Run Tests
run: mix test --trace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
Expand All @@ -54,3 +55,36 @@ jobs:
steps:
- name: Pass all checks
run: echo "Tests passed"
coverage:
runs-on: ubuntu-latest
env:
MIX_ENV: test
steps:
- name: Set Elixir and OTP versions
id: elixir-otp
run: |
echo "elixir=$(sed 's/-.*$//' <<< $version)" >> $GITHUB_OUTPUT
echo "otp=$(sed 's/^.*-//' <<< $version)" >> $GITHUB_OUTPUT
env:
version: "1.17-27"
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ steps.elixir-otp.outputs.otp }}
elixir-version: ${{ steps.elixir-otp.outputs.elixir }}
- name: Cache Elixir dependencies
uses: actions/cache@v2
with:
path: |
deps
_build
key: ${{ runner.os }}-deps-${{ steps.elixir-otp.outputs.elixir }}-${{ steps.elixir-otp.outputs.otp }}-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-deps-${{ steps.elixir-otp.outputs.elixir }}-${{ steps.elixir-otp.outputs.otp }}-${{ hashFiles('mix.lock') }}
${{ runner.os }}-deps-${{ steps.elixir-otp.outputs.elixir }}-${{ steps.elixir-otp.outputs.otp }}-
- name: Install Dependencies
run: mix do deps.get, deps.compile
- name: Run Tests & Coverage Analysis
run: mix coveralls.github --trace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 464441e

Please sign in to comment.