update env vars #20
This file contains hidden or 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: | |
| push: | |
| pull_request: | |
| jobs: | |
| lint: | |
| name: Lint (format + credo) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: elixir:1.20.1-otp-29 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y build-essential git libsqlite3-dev sqlite3 pkg-config libssl-dev curl | |
| - name: Install Rust toolchain (native NIFs, e.g. mdex_native / ex_sctp) | |
| run: | | |
| curl https://sh.rustup.rs -sSf | sh -s -- -y | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Set up mix | |
| working-directory: /tmp | |
| run: | | |
| mix local.hex --force | |
| mix local.rebar --force | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Check formatting | |
| run: mix format --check-formatted | |
| - name: Credo (strict) | |
| run: mix credo --strict | |
| - name: Audit dependencies for known vulnerabilities | |
| run: mix deps.audit | |
| test: | |
| name: Build & test (SQLite) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: elixir:1.20.1-otp-29 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y build-essential git libsqlite3-dev sqlite3 pkg-config libssl-dev curl | |
| - name: Install Rust toolchain (native NIFs, e.g. mdex_native / ex_sctp) | |
| run: | | |
| curl https://sh.rustup.rs -sSf | sh -s -- -y | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Set up mix | |
| working-directory: /tmp | |
| run: | | |
| mix local.hex --force | |
| mix local.rebar --force | |
| - name: Install dependencies | |
| run: MIX_ENV=test mix deps.get | |
| - name: Compile (warnings as errors) | |
| run: MIX_ENV=test mix compile --warnings-as-errors | |
| - name: Run tests | |
| run: MIX_ENV=test mix test | |
| docker-build: | |
| name: Docker build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3 | |
| # Validates the Dockerfile builds end-to-end (deps, plugins, assets). | |
| - name: Build image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: false | |
| tags: gamend-starter:ci | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |