Merge pull request #930 from jaytaph/documentfragment #65
This file contains hidden or 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: Gosub Continuous Integration (CI) | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust_version: [ stable, nightly, 1.82.0 ] | |
| # rust_version: [ stable, beta, nightly, 1.73.0, "stable minus 1 release", "stable minus 2 releases" ] | |
| # os: [ ubuntu-24.04, windows-latest, macos-latest ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust_version }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ${{ matrix.rust_version }} | |
| cache-targets: "false" | |
| - name: Install dependencies | |
| run: sudo apt update -y && sudo apt install sqlite3 libsqlite3-dev libglib2.0-dev libcairo2-dev libgdk-pixbuf-2.0-dev libpango1.0-dev libgtk-4-dev -y | |
| - uses: taiki-e/install-action@nextest | |
| - name: Build and test | |
| run: cargo nextest run --locked --all --no-fail-fast | |
| - name: Doctests | |
| run: cargo test --doc --locked --all | |
| clippy: | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust_version: [ stable, nightly ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust_version }} | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ${{ matrix.rust_version }} | |
| cache-targets: "false" | |
| - name: Install dependencies | |
| run: sudo apt update -y && sudo apt install sqlite3 libsqlite3-dev libglib2.0-dev libcairo2-dev libgdk-pixbuf-2.0-dev libpango1.0-dev libgtk-4-dev -y | |
| - name: Run Clippy | |
| run: cargo clippy --locked --all --all-targets -- -D warnings | |
| check-features: | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: stable | |
| cache-targets: "false" | |
| - name: Install dependencies | |
| run: sudo apt update -y && sudo apt install sqlite3 libsqlite3-dev libglib2.0-dev libcairo2-dev libgdk-pixbuf-2.0-dev libpango1.0-dev libgtk-4-dev -y | |
| - name: Check all features compile | |
| run: cargo check --locked --all --all-features | |
| fmt: | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: stable | |
| cache-targets: "false" | |
| - name: Run fmt | |
| run: cargo fmt --check --all | |
| audit: | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: rustsec/audit-check@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} |