name: build on: push env: DEV_SHELL_NAME: CI CI: true jobs: build-cargo: runs-on: flakes-action steps: - uses: actions/checkout@v3 name: Checkout - uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main - uses: actions/cache@v3 with: path: | ~/.cargo/bin/ ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Run tests run: | nix develop -c cargo nextest run --run-ignored all - name: Build release run: | nix develop -c cargo build --release build-nix: runs-on: flakes-action steps: - uses: actions/checkout@v3 name: Checkout - uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main - uses: actions/cache@v3 with: path: | ~/.cargo/bin/ ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: run: | nix build check-nix: runs-on: flakes-action steps: - uses: actions/checkout@v3 name: Checkout - name: Metadata run: | nix flake metadata - uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main - uses: actions/cache@v3 with: path: | ~/.cargo/bin/ ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Statix run: | nix develop -c statix check - name: Flake check run: | nix flake check