fuzzyworld

template / commit

Install linter during linting step.

6c53be41d96535a53ab7c4549e5800551df76ec5 · Pavel Safronov · 2022-11-15 23:05:46 -0800 · parents 65ce20f248f8

Install linter during linting step.
 .gitlab-ci.yml | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9e996fd..ec32fd8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,19 +19,10 @@
 image: golang:1.19
 
 stages:          # List of stages for jobs, and their order of execution
-  - prep
   - build
   - test
   - deploy
 
-prepare:
-  stage: prep
-  script:
-    - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.50.1
-    - export PATH=$PATH:./bin
-    - whereis golangci-lint
-    - golangci-lint --version
-
 build-job:       # This job runs in the build stage, which runs first.
   stage: build
   script:
@@ -50,6 +41,10 @@ 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
+    - export PATH=$PATH:./bin
+    - whereis golangci-lint
+    - golangci-lint --version
     - make lint
     - echo "No lint issues found."