diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3e4e548355cbfcf5f75d3eda8dd22f6de3112cab..fc5aa90e0d8695975fb1649aef69695b1db93c00 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,5 @@
 ---
 
-image: debian:buster
-
 variables:
   GOCACHE: $CI_PROJECT_DIR/.gocache
   GOPATH: $CI_PROJECT_DIR/.go
@@ -11,12 +9,13 @@ cache:
     - .gocache
     - .go
 
-before_script:
-  - echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list
-  - apt-get update && apt-get -qq -y -t buster-backports install golang git
-  - go version
-
 build:
+  image: debian:buster
+  stage: build
+  before_script:
+    - echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list
+    - apt-get update && apt-get -qq -y -t buster-backports install golang git
+    - go version
   script:
     - go build -o $CI_PROJECT_NAME-$GOOS-$GOARCH
   artifacts:
@@ -29,3 +28,17 @@ build:
         GOARCH:
           - amd64
           - arm
+
+lint:
+  image: golangci/golangci-lint:v1.39-alpine
+  stage: test
+  allow_failure: true
+  needs: []
+  script:
+    - golangci-lint run -v --max-issues-per-linter=0 --max-same-issues=0 --out-format=junit-xml --timeout=10m > golangci-output.xml
+  artifacts:
+    paths:
+      - golangci-output.xml
+    reports:
+      junit: golangci-output.xml
+    expire_in: 7 days