From b68523ec9c38bd86f65edfb6687d2b767a0a74b4 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Wed, 8 Dec 2021 05:10:08 +0300 Subject: Test --- .gitlab-ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) (limited to '.gitlab-ci.yml') 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 -- cgit 1.4.1