Skip to content

ci: update PR ci to only run one "task" with all jobs and not two "ta… #13

ci: update PR ci to only run one "task" with all jobs and not two "ta…

ci: update PR ci to only run one "task" with all jobs and not two "ta… #13

name: Check branch changes
on:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
backend_lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust/api-server
steps:
- uses: actions/checkout@v4
- name: Rust setup
run: rustup toolchain install stable --profile minimal
- name: Lint
run: cargo fmt --check
backend_build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust/api-server
steps:
- uses: actions/checkout@v4
- name: Rust setup
run: rustup toolchain install stable --profile minimal
- name: Cache Cargo build target
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
rust/api-server/target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --release --bin bitcraft-hub-api