[GH-1010] - Fix deathmatch endgame results #3337
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: [main] | |
pull_request: | |
branches: [main] | |
env: | |
MIX_ENV: test | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
elixir: [1.16.0] | |
otp: [26.0.2] | |
services: | |
db: | |
image: postgres:16-alpine | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: arena_test | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
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: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Elixir set up | |
run: | | |
mix local.hex --force | |
mix local.rebar --force | |
mix deps.get | |
- name: Check Elixir Formatting | |
run: mix format --check-formatted | |
- name: Credo check | |
run: mix credo | |
- name: Compiles without warnings | |
run: mix compile --all-warnings --warnings-as-errors | |
- name: Run tests | |
run: mix test | |
- name: (Arena) Check Rust Formatting | |
working-directory: apps/arena/native/physics/ | |
run: cargo fmt --all -- --check | |
- name: (Arena) Clippy Rust checks | |
working-directory: apps/arena/native/physics/ | |
run: cargo clippy --all-targets -- -D warnings |