Synvael/.forgejo/workflows/ci.yml
Serkyo 205f9cd0f7
Some checks failed
CI / Rust Check & Lint (push) Has been cancelled
CI / Rust Tests (push) Has been cancelled
CI / Lua Lint & Format (push) Has been cancelled
CI / LFS Pointer Guard (push) Has been cancelled
ci(workspace): migrate github configs to forgejo
2026-08-07 00:27:09 +02:00

85 lines
2.1 KiB
YAML

name: CI
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev", "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
rust-lint:
name: Rust Check & Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Install shader compiler
run: sudo apt-get update && sudo apt-get install -y libshaderc-dev
- name: Check Rust Formatting
run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
rust-test:
name: Rust Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Install shader compiler
run: sudo apt-get update && sudo apt-get install -y libshaderc-dev
- name: Run Tests
run: cargo test --workspace --all-features
lua-lint:
name: Lua Lint & Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Lua Formatting
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check assets/scripts/ mods/
- name: Run Selene
run: ./.forgejo/scripts/run-selene.sh
lfs-guard:
name: LFS Pointer Guard
runs-on: ubuntu-latest
steps:
# Checkout without smudging LFS content so the committed git objects can be inspected directly; a raw-committed binary is only distinguishable from a proper pointer at the object level, not in a smudged working tree.
- uses: actions/checkout@v4
with:
lfs: false
- name: Verify LFS-tracked files are stored as pointers
run: ./.forgejo/scripts/check-lfs-pointers.sh