Skip to content

Commit

Permalink
ci : update gitlab ci (#955)
Browse files Browse the repository at this point in the history
- Only run on feature branches
- Use shared cache
  • Loading branch information
jooola authored Jul 15, 2024
1 parent 60163c5 commit 74d822a
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,39 @@ include:
- project: cloud/integrations/ci
file:
- default.yml
- workflows/feature-branches.yml

stages:
- build
- test

test:acceptance:
stage: test
variables:
GOMODCACHE: $CI_PROJECT_DIR/.cache/go-mod
GOCACHE: $CI_PROJECT_DIR/.cache/go-build

cache:
key:
files:
- go.mod
- go.sum
paths:
- $GOMODCACHE

build:
stage: build
image: golang:1.21
except:
- tags
script:
- make testacc
- go env
- go mod download

test:golangci-lint:
test:lint:
stage: test
image: golangci/golangci-lint:v1.59.1
image: golangci/golangci-lint:v1.59
script:
- golangci-lint run -v
except:
- tags
- master

test:unit:
stage: test
image: golang:1.21
script:
- make test

0 comments on commit 74d822a

Please sign in to comment.