diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 677a084..0bb66d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/shell.nix b/shell.nix index 039edc2..d6cdd9f 100644 --- a/shell.nix +++ b/shell.nix @@ -4,6 +4,7 @@ let in pkgs.mkShell { buildInputs = [ + pkgs.git pkgs.nodejs-16_x pkgs.yarn pkgs.dotnet-sdk_5