You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-08-10 22:51:31 +02:00
Improve CI (#819)
* simplify github actions workflow no more GOPATH, update Go to 1.15.x * add script to install golangci-lint * drop support for Go 1.14 * check docker build in ci * update alpine linux to 3.12 * update CHANGELOG * fix golangci-lint installation Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
This commit is contained in:
28
.github/workflows/ci.yaml
vendored
28
.github/workflows/ci.yaml
vendored
@@ -14,42 +14,46 @@ jobs:
|
||||
build:
|
||||
env:
|
||||
COVER: true
|
||||
GOPATH: ${{ github.workspace }}
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ./src/github.com/${{ github.repository }}
|
||||
|
||||
- name: Set up Go 1.14
|
||||
- name: Set up Go 1.15
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ^1.14
|
||||
go-version: 1.15.x
|
||||
id: go
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
cd src/github.com/${{ github.repository }}
|
||||
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.24.0
|
||||
GO111MODULE=on go mod download
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0
|
||||
go mod download
|
||||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||
chmod +x ./cc-test-reporter
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
cd src/github.com/${{ github.repository }}
|
||||
make lint
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd src/github.com/${{ github.repository }}
|
||||
make build
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||
run: |
|
||||
cd src/github.com/${{ github.repository }}
|
||||
./test.sh
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Docker Build
|
||||
run: |
|
||||
make docker
|
||||
|
Reference in New Issue
Block a user