ci: updating Nix elements

This commit is contained in:
Dylan R. E. Moonfire 2021-11-18 01:59:56 -06:00
parent b48d2b22cb
commit 0e050445aa
2 changed files with 28 additions and 27 deletions

View file

@ -1,7 +1,7 @@
# Nix handling based on https://gitlab.com/Vonfry/gitlab-ci-nix/-/blob/master/.gitlab-ci.yml
stages:
- build
- test
#- test
- release
variables:
@ -11,8 +11,6 @@ variables:
default:
image: nixos/nix:latest
before_script:
- nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
- nix-channel --update
- "[ -f $LOCAL_NIX_STORE ] && nix-store --import < $LOCAL_NIX_STORE"
after_script:
- "[ ! -d $(dirname \"$LOCAL_NIX_STORE\") ] && mkdir -p $LOCAL_NIX_STORE"
@ -31,34 +29,36 @@ build:
rules:
- if: $CI_COMMIT_BRANCH
test:
stage: test
script:
- nix-shell --run "npm run test"
# Testing is currently not working.
#- 'dotnet test --test-adapter-path:. --logger:"junit;LogFilePath=../artifacts/{assembly}-test-result.xml;MethodFormat=Default;FailureBodyFormat=Verbose" --collect:"XPlat Code Coverage"'
# Summarize the output for Gitlab CI reporting.
#- dotnet new tool-manifest
#- dotnet tool install dotnet-reportgenerator-globaltool
#- dotnet tool run reportgenerator -reports:src/*/TestResults/*/coverage.cobertura.xml -targetdir:./coverage "-reporttypes:Cobertura;TextSummary"
#- grep "Line coverage" coverage/Summary.txt
artifacts:
when: always
paths:
- ./**/*test-result.xml
- ./coverage/Cobertura.xml
- ./coverage/Summary.*
- ./**/*.nupkg
reports:
junit:
- ./**/*test-result.xml
cobertura:
- ./coverage/Cobertura.xml
#test:
# stage: test
# script:
# - nix-shell --run "npm run test"
# # Testing is currently not working.
# #- 'dotnet test --test-adapter-path:. --logger:"junit;LogFilePath=../artifacts/{assembly}-test-result.xml;MethodFormat=Default;FailureBodyFormat=Verbose" --collect:"XPlat Code Coverage"'
#
# # Summarize the output for Gitlab CI reporting.
# #- dotnet new tool-manifest
# #- dotnet tool install dotnet-reportgenerator-globaltool
# #- dotnet tool run reportgenerator -reports:src/*/TestResults/*/coverage.cobertura.xml -targetdir:./coverage "-reporttypes:Cobertura;TextSummary"
# #- grep "Line coverage" coverage/Summary.txt
# artifacts:
# when: always
# paths:
# - ./**/*test-result.xml
# - ./coverage/Cobertura.xml
# - ./coverage/Summary.*
# - ./**/*.nupkg
# reports:
# junit:
# - ./**/*test-result.xml
# cobertura:
# - ./coverage/Cobertura.xml
publish:
stage: release
script:
- nix-shell --run "npm install --ci"
- nix-shell --run "npm run build"
- nix-shell --run "npm run semantic-release"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

View file

@ -4,6 +4,7 @@ let
in
pkgs.mkShell {
buildInputs = [
pkgs.git
pkgs.nodejs-16_x
pkgs.yarn
pkgs.dotnet-sdk_5