template / commit
Install snap and pwsh as first CI step.
.gitlab-ci.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1518e8..f1e5810 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,27 +18,31 @@ image: golang:1.19 -stages: # List of stages for jobs, and their order of execution +before_script: + - apt-get install snap snapd -y + - snap install powershell --classic + +stages: # List of stages for jobs, and their order of execution - build - test - release -build-job: # This job runs in the build stage, which runs first. +build-job: # This job runs in the build stage, which runs first. stage: build script: - echo "Compiling the code..." - make build - echo "Compile complete." -unit-test-job: # This job runs in the test stage. - stage: test # It only starts when the job in the build stage completes successfully. +unit-test-job: # This job runs in the test stage. + stage: test # It only starts when the job in the build stage completes successfully. script: - echo "Running unit tests... This will take about 60 seconds." - make test - echo "Code coverage is 90%" -lint-test-job: # This job also runs in the test stage. - stage: test # It can run at the same time as unit-test-job (in parallel). +lint-test-job: # This job also runs in the test stage. + stage: test # It can run at the same time as unit-test-job (in parallel). script: - echo "Linting code... This will take about 10 seconds." - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.50.1