mirror of
https://github.com/euzu/tuliprox.git
synced 2026-09-27 11:32:11 +02:00
62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
# push:
|
|
# branches: []
|
|
pull_request:
|
|
branches: [develop]
|
|
|
|
# Avoid running the same CI multiple times for the same PR
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
# Job 1: Check markdown files
|
|
markdown:
|
|
name: Markdown Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Lint Markdown files
|
|
uses: DavidAnson/markdownlint-cli2-action@v22
|
|
with:
|
|
globs: '**/*.md'
|
|
|
|
# Job 2: Check code style (very fast)
|
|
style:
|
|
name: Format & Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Nightly Rust
|
|
uses: dtolnay/rust-toolchain@nightly
|
|
with:
|
|
components: rustfmt, clippy
|
|
|
|
- name: Check Formatting
|
|
# This now works with cargo +nightly fmt
|
|
run: make fmt-check
|
|
|
|
- name: Lint with Clippy
|
|
run: make lint
|
|
|
|
# Job 3: Build and Test (takes longer)
|
|
test:
|
|
name: Build & Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Stable Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Rust Cache
|
|
# This magic step saves compiled dependencies between runs
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Run Tests
|
|
run: make test
|