Skip to content

Commit

Permalink
Update CI Elixir and Erlang versions
Browse files Browse the repository at this point in the history
  • Loading branch information
alisinabh committed Jan 1, 2025
1 parent d059ad8 commit 36383ce
Showing 1 changed file with 45 additions and 46 deletions.
91 changes: 45 additions & 46 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ name: Elixir CI

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

permissions:
contents: read
Expand All @@ -27,64 +27,63 @@ jobs:
strategy:
matrix:
variation:
- otp: '27.x'
elixir: '1.17'
- otp: "27.x"
elixir: "1.18"
report_coverage: true
# No OTP-27 and Elixir 1.16.x support
- otp: '26.x'
elixir: '1.17'
- otp: "26.x"
elixir: "1.18"
report_coverage: false
- otp: '26.x'
elixir: '1.16'
- otp: "27.x"
elixir: "1.17"
report_coverage: false
- otp: '25.x'
elixir: '1.16'
- otp: "26.x"
elixir: "1.17"
report_coverage: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.variation.otp}}
elixir-version: ${{matrix.variation.elixir}}
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.variation.otp}}
elixir-version: ${{matrix.variation.elixir}}

- name: Install Solidity
run: |
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
- name: Install Solidity
run: |
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-

- name: Install dependencies
run: mix deps.get
- name: Install dependencies
run: mix deps.get

- name: Start Anvil (Background)
run: anvil &
- name: Start Anvil (Background)
run: anvil &

- name: Prepare for tests
run: elixir test/test_prepare.exs
- name: Prepare for tests
run: elixir test/test_prepare.exs

- name: Run tests and report coverage
if: ${{matrix.variation.report_coverage}}
run: mix coveralls.github
- name: Run tests and report coverage
if: ${{matrix.variation.report_coverage}}
run: mix coveralls.github

- name: Run tests
if: ${{!matrix.variation.report_coverage}}
run: mix coveralls
- name: Run tests
if: ${{!matrix.variation.report_coverage}}
run: mix coveralls

- name: Credo
run: mix credo --strict
- name: Credo
run: mix credo --strict

- name: Dialyzer
run: mix dialyzer
- name: Dialyzer
run: mix dialyzer

0 comments on commit 36383ce

Please sign in to comment.