Skip to content

Improve name service + offchain lookup support (#159) #531

Improve name service + offchain lookup support (#159)

Improve name service + offchain lookup support (#159) #531

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Elixir CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
test:
name: Test - Lint - Dialyze
runs-on: ubuntu-latest
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
variation:
- otp: '27.x'
elixir: '1.17'
report_coverage: true
# No OTP-27 and Elixir 1.16.x support
- otp: '26.x'
elixir: '1.17'
report_coverage: false
- otp: '26.x'
elixir: '1.16'
report_coverage: false
- otp: '25.x'
elixir: '1.16'
report_coverage: false
steps:
- 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: 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: 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: Start Anvil (Background)
run: anvil &
- 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
if: ${{!matrix.variation.report_coverage}}
run: mix coveralls
- name: Credo
run: mix credo --strict
- name: Dialyzer
run: mix dialyzer