This repository has been archived on 2023-02-02. You can view files and clone it, but cannot push or open issues or pull requests.
mfgames-nitride-cil/.gitlab-ci.yml

47 lines
1.1 KiB
YAML
Raw Normal View History

2021-11-19 03:49:28 +00:00
include:
- template: Security/SAST.gitlab-ci.yml
2021-11-19 03:49:28 +00:00
2021-09-07 05:15:45 +00:00
stages:
- build
2021-11-19 03:53:05 +00:00
- test
2021-11-18 07:36:13 +00:00
- release
2021-09-07 05:15:45 +00:00
default:
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
2021-09-07 05:15:45 +00:00
build:
stage: build
script:
- nix develop --command scripts/build.sh
2021-11-18 07:36:13 +00:00
rules:
- if: $CI_COMMIT_BRANCH
2021-09-07 05:15:45 +00:00
test:
stage: test
script:
- nix develop --command scripts/test.sh
artifacts:
when: always
paths:
- ./**/*test-result.xml
- ./coverage/Cobertura.xml
- ./coverage/Summary.*
- ./**/*.nupkg
reports:
2022-06-05 19:20:45 +00:00
coverage_report:
coverage_format: cobertura
path: ./coverage/Cobertura.xml
junit:
- ./**/*test-result.xml
2021-11-18 07:36:13 +00:00
publish:
stage: release
before_script:
# Set it up so we can push the tag
- project_url=$(echo $CI_PROJECT_URL | sed 's/https:\/\///')
- git remote set-url origin https://oauth2:$GITLAB_TOKEN@$project_url
2021-11-18 07:36:13 +00:00
script:
- nix develop --command scripts/release.sh
2021-11-18 07:36:13 +00:00
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH