diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f88c3cd..c5067a4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,48 @@ --- image: nixpkgs/nix-flakes:latest + variables: NIX_PATH: "nixpkgs=channel:nixpkgs-unstable" +before_script: + - nix --version + stages: - - test + - env + - check + - cache + +show: + stage: env + script: + - env + - nix show-config | + tee show-config.log + - nix show-derivation | + tee show-derivation.log + artifacts: + paths: + - show-config.log + - show-derivation.log + expire_in: 1 week + when: on_success + +check: + stage: check + script: + - nix flake check --show-trace + allow_failure: true -test: - stage: test +cache: + stage: cache script: - - nix --version - - nix flake check + - > + nix build --show-trace --json | + jq -r '.[].outputs | to_entries[].value' | + nix shell nixpkgs#cachix + --command cachix push $CACHIX_CACHE_NAME + artifacts: + paths: + - result + expire_in: 1 week + when: on_success |