shifty-backend/.github/workflows/rust.yml
neosam 14cc281c27
Some checks failed
Rust / build (push) Failing after 56s
Fix nix-env command when installing cargo again
2024-06-29 12:46:10 +00:00

31 lines
634 B
YAML

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
SQLX_OFFLINE: "true"
jobs:
build:
runs-on: nixos
steps:
- name: Install node
run: nix-env -iA nixpkgs.nodejs
- uses: actions/checkout@v4
- name: Install cargo
run: nix-env -iA nixpkgs.cargo
- name: Formatting
run: cargo fmt --all -- --check
- name: Build local version
run: cargo build --verbose
- name: Build OIDC version
run: cargo build --verbose --no-default-features --features oidc
- name: Run tests
run: cargo test --verbose