Fix Battles using all units instead of selected units #787
Workflow file for this run
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-latest | |
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 | |
working-directory: apps/arena/ | |
run: | | |
mix local.hex --force | |
mix local.rebar --force | |
mix deps.get | |
- name: Credo Elixir and Clippy Rust Check | |
working-directory: apps/arena/ | |
run: make lints | |
- name: Check Elixir Formatting | |
working-directory: apps/arena/ | |
run: mix format --check-formatted | |
- name: Check Rust Formatting | |
working-directory: apps/arena/ | |
run: cargo fmt --manifest-path native/physics/Cargo.toml --all -- --check | |
- name: Compiles without warnings | |
working-directory: apps/arena/ | |
run: mix compile --all-warnings --warnings-as-errors | |
- name: Run tests | |
working-directory: apps/arena/ | |
run: mix test |