|
|
@@ -27,7 +27,26 @@ env:
|
|
|
CARGO_TERM_COLOR: always
|
|
|
RUSTFLAGS: --deny warnings
|
|
|
jobs:
|
|
|
+ no-merge-commits:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ steps:
|
|
|
+ - name: Checkout
|
|
|
+ uses: actions/checkout@v4
|
|
|
+ - name: Run test
|
|
|
+ uses: NexusPHP/no-merge-commits@v2.1.0
|
|
|
+ with:
|
|
|
+ token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
+
|
|
|
+ conventional:
|
|
|
+ needs: no-merge-commits
|
|
|
+ name: Conventional Commits
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v4
|
|
|
+ - uses: webiny/action-conventional-commits@v1.3.0
|
|
|
+
|
|
|
unit-tests:
|
|
|
+ needs: conventional
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
|
|
strategy:
|
|
|
@@ -52,3 +71,33 @@ jobs:
|
|
|
run: cargo clippy -- -D warnings
|
|
|
- name: Run unit tests
|
|
|
run: cargo hack test
|
|
|
+
|
|
|
+ flake-check:
|
|
|
+ needs: conventional
|
|
|
+ name: Check Nix Flake
|
|
|
+ runs-on: ubuntu-22.04
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v4
|
|
|
+ - name: Install Nix
|
|
|
+ uses: DeterminateSystems/nix-installer-action@v16
|
|
|
+ - name: Setup Nix cache
|
|
|
+ uses: DeterminateSystems/magic-nix-cache-action@main
|
|
|
+ - name: Nix Flake Check
|
|
|
+ run: nix flake check --all-systems -L
|
|
|
+
|
|
|
+ flake-build:
|
|
|
+ needs: conventional
|
|
|
+ name: Build Nix package
|
|
|
+ # if cross compilation is desired add 'aarch64-linux', 'x86_64-darwin' and 'aarch64-darwin' and fix the flake to support cross compilation.
|
|
|
+ strategy:
|
|
|
+ matrix:
|
|
|
+ target: [x86_64-linux]
|
|
|
+ runs-on: ubuntu-22.04
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v4
|
|
|
+ - name: Install Nix
|
|
|
+ uses: DeterminateSystems/nix-installer-action@v16
|
|
|
+ - name: Setup Nix cache
|
|
|
+ uses: DeterminateSystems/magic-nix-cache-action@main
|
|
|
+ - name: Nix Build
|
|
|
+ run: nix build .#packages.${{ matrix.target }}.default -L
|