Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 13 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,18 @@
name: build
name: "Test"
on:
pull_request:
push:
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
nix:
- name: 2.5.1
url: https://releases.nixos.org/nix/nix-2.5.1/install
runs-on: ${{ matrix.os }}
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v15
with:
install_url: ${{ matrix.nix.url }}
extra_nix_config: |
experimental-features = nix-command flakes

- name: enable binary cache
uses: cachix/cachix-action@v10
with:
name: statix
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- run: nix flake check

# this also includes `cargo test`
- name: build statix
run: nix build -L

- name: build and install statix with flake-compat
run: nix-env -if default.nix
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: build statix
run: nix build -L
- name: test statix
run: nix flake check
- name: build statix and install statix in flake-compat mode
run: nix-env -if default.nix
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
nixpkgsFor = forAllSystems (system:
import nixpkgs {
inherit system;
overlays = [ self.overlay ];
overlays = [ self.overlays.default ];
});

chanspec = {
Expand All @@ -42,7 +42,7 @@
in
{

overlay = final: prev: {
overlays.default = final: prev: {

statix = with final;
let
Expand Down