aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorrtkay123 <dev@kanjala.com>2026-04-06 22:02:47 +0200
committerrtkay123 <dev@kanjala.com>2026-04-06 22:02:47 +0200
commitbe2af8a5fe2e58953b4970e3fed970165fc4b4ca (patch)
tree67dba5cc6ff099e5aff100ff0489579e1817de60 /.github
parentee324d087ae51f7fa285c00f6ac69fb597003be9 (diff)
downloadsellershut-be2af8a5fe2e58953b4970e3fed970165fc4b4ca.tar.bz2
sellershut-be2af8a5fe2e58953b4970e3fed970165fc4b4ca.zip
ci: build
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yaml115
1 files changed, 115 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 0000000..e8ed1da
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,115 @@
+permissions:
+ contents: read
+on:
+ push:
+ branches: [master]
+ pull_request:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+name: ci
+
+jobs:
+ clippy:
+ runs-on: ubuntu-latest
+ permissions:
+ security-events: write # to upload sarif results
+ name: beta / clippy
+ steps:
+ - uses: actions/checkout@v6
+ - uses: dtolnay/rust-toolchain@master
+ with:
+ toolchain: beta
+ components: clippy,rustfmt
+ - uses: Swatinem/rust-cache@v2
+ - run: cargo install clippy-sarif sarif-fmt
+ - name: Run rust-clippy
+ run:
+ cargo clippy
+ --workspace
+ --all-features
+ --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
+ continue-on-error: true
+ - name: Upload analysis results to GitHub
+ uses: github/codeql-action/upload-sarif@v4
+ with:
+ sarif_file: rust-clippy-results.sarif
+ wait-for-processing: true
+ fmt:
+ runs-on: ubuntu-latest
+ name: stable / fmt
+ steps:
+ - uses: actions/checkout@v6
+ - name: Install stable
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ components: rustfmt
+ - name: cargo fmt --check
+ run: cargo fmt --check
+ os-check:
+ runs-on: ${{ matrix.os }}
+ name: ${{ matrix.os }} / stable
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [macos-latest, windows-latest]
+ steps:
+ - uses: actions/checkout@v6
+ - name: Install stable
+ uses: dtolnay/rust-toolchain@stable
+ - name: Install cargo-nextest
+ uses: taiki-e/install-action@v2
+ with:
+ tool: cargo-nextest
+ - uses: Swatinem/rust-cache@v2
+ - name: cargo test --workspace
+ run: cargo nextest run --no-run --workspace --locked --all-features --all-targets
+ - name: cargo build
+ run: cargo build --workspace --locked --all-features --all-targets
+ msrv:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ msrv: ["1.94.1"]
+ name: msrv / ${{ matrix.msrv }}
+ steps:
+ - uses: actions/checkout@v6
+ - name: Install ${{ matrix.msrv }}
+ uses: dtolnay/rust-toolchain@master
+ with:
+ toolchain: ${{ matrix.msrv }}
+ - name: Install protoc
+ uses: arduino/setup-protoc@v3
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ - name: cargo install cargo-hack
+ uses: taiki-e/install-action@cargo-hack
+ - name: cargo hack +${{ matrix.msrv }}
+ run: cargo hack --clean-per-run --feature-powerset check
+ test:
+ runs-on: ubuntu-latest
+ needs:
+ - os-check
+ name: test / workspace
+ steps:
+ - uses: actions/checkout@v6
+ - name: Start stack
+ run: docker compose up -d
+ - name: Install stable
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ components: llvm-tools-preview
+ - uses: taiki-e/install-action@cargo-llvm-cov
+ - name: Install cargo-nextest
+ uses: taiki-e/install-action@v2
+ with:
+ tool: cargo-nextest
+ - uses: Swatinem/rust-cache@v2
+ - name: Stop stack
+ if: always()
+ run: |
+ docker compose down -v
+ docker stop $(docker ps -aq) || true
+ docker rm $(docker ps -aq) || true