This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
Remove testnet (#424) #1141
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: CI | |
on: | |
merge_group: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
MIX_ENV: test | |
permissions: | |
contents: read | |
jobs: | |
build: | |
env: | |
RPC_API_HOST: ${{ secrets.RPC_API_HOST }} | |
SEPOLIA_RPC_API_HOST: ${{ secrets.SEPOLIA_RPC_API_HOST }} | |
name: Build and test | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
strategy: | |
matrix: | |
elixir: [1.15] | |
otp: [25] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} # Define the elixir version [required] | |
otp-version: ${{ matrix.otp }} # Define the OTP version [required] | |
env: | |
ImageOS: ubuntu20 | |
- name: Restore dependencies cache | |
uses: actions/cache@v3 | |
with: | |
path: server/deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Check Elixir Formatting | |
run: mix format --check-formatted | |
- name: Compiles without warnings | |
run: mix compile --all-warnings --warnings-as-errors | |
- name: Run tests | |
run: mix test |