mirror of
				https://gitlab.crans.org/nounous/ghostream.git
				synced 2025-11-04 00:32:04 +01:00 
			
		
		
		
	Cache go modules in CI
This commit is contained in:
		@@ -2,8 +2,18 @@ stages:
 | 
				
			|||||||
  - test
 | 
					  - test
 | 
				
			||||||
  - quality-assurance
 | 
					  - quality-assurance
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.go-cache:
 | 
				
			||||||
 | 
					  variables:
 | 
				
			||||||
 | 
					    GOPATH: $CI_PROJECT_DIR/.go
 | 
				
			||||||
 | 
					  before_script:
 | 
				
			||||||
 | 
					    - mkdir -p .go
 | 
				
			||||||
 | 
					  cache:
 | 
				
			||||||
 | 
					    paths:
 | 
				
			||||||
 | 
					      - .go/pkg/mod/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
unit_tests:
 | 
					unit_tests:
 | 
				
			||||||
  image: golang:1.15-alpine
 | 
					  image: golang:1.15-alpine
 | 
				
			||||||
 | 
					  extends: .go-cache
 | 
				
			||||||
  stage: test
 | 
					  stage: test
 | 
				
			||||||
  before_script:
 | 
					  before_script:
 | 
				
			||||||
    - apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community build-base ffmpeg gcc libsrt-dev
 | 
					    - apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community build-base ffmpeg gcc libsrt-dev
 | 
				
			||||||
@@ -18,6 +28,7 @@ unit_tests:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
linters:
 | 
					linters:
 | 
				
			||||||
  image: golang:1.15-alpine
 | 
					  image: golang:1.15-alpine
 | 
				
			||||||
 | 
					  extends: .go-cache
 | 
				
			||||||
  stage: quality-assurance
 | 
					  stage: quality-assurance
 | 
				
			||||||
  script:
 | 
					  script:
 | 
				
			||||||
    - go get -u golang.org/x/lint/golint
 | 
					    - go get -u golang.org/x/lint/golint
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user