1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-08-10 22:51:31 +02:00

ci: migrate to Github Actions, close #546 (#750)

* ci: migrate to Github Actions

* ci: optimize on feedback

* ci: run gocov in correct dir

* ci: running after-build script always

* ci: giving test script execute permission

* ci: correct error handling on test script

* ci: more verbose test script

* ci: configure CC_TEST_REPORTER_ID env

* ci: check existence of CC_TEST_REPORT_ID variable, skip if unset

* ci: check existence of CC_TEST_REPORT_ID variable, skip if unset

* update changelog

* Update CHANGELOG.md

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
This commit is contained in:
Shinebayar G
2020-10-05 04:29:47 -05:00
committed by GitHub
parent 8be97f25e7
commit dc7dbc5d28
3 changed files with 83 additions and 0 deletions

55
.github/workflows/ci.yaml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Continuous Integration
on:
push:
branches:
- '**'
# - $default-branch
pull_request:
branches:
- '**'
# - $default-branch
jobs:
build:
env:
COVER: true
GOPATH: ${{ github.workspace }}
runs-on: ubuntu-18.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
path: ./src/github.com/${{ github.repository }}
- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: ^1.14
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 -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