move token to being a userdata called TemplateContext to *heavily* cl… #999
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: Cargo Build & Test | |
on: | |
push: | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_and_test: | |
name: Botv2 | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: . | |
strategy: | |
matrix: | |
toolchain: | |
- nightly # Only nightly is guaranteed to work so don't bother with anything else for now | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: ${{ matrix.toolchain }} | |
workspaces: "botv2 -> target" | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.3' # The Go version to download (if necessary) and use. | |
- name: Install dependencies | |
run: sudo apt install pkg-config openssl libssl-dev build-essential clangd clang libclang-14-dev lld mold | |
- name: Setup Rust | |
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
- uses: ankane/setup-postgres@v1 | |
with: | |
postgres-version: 16 | |
dev-files: true | |
- run: createdb runner | |
- run: psql -c "CREATE ROLE antiraid WITH PASSWORD 'runner';" | |
- run: createdb antiraid | |
- name: Setup Postgres | |
run: data/misc/ibl db load data/seed.iblcli-seed --db antiraid | |
env: | |
PGPASSWORD: runner | |
- name: Fetch all submodules | |
run: git submodule update --init --recursive | |
- run: make buildall | |
env: | |
CI_BUILD: true | |
DATABASE_URL: postgres:///antiraid | |
# The below doesn't work due to ci issues (sigh) | |
# - run: cargo test --verbose | |
# env: | |
# CI_BUILD: true |