mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-06 12:52:53 +02:00
deployment: Add testing workflow (#583)
* Add testing workflow * Remove testing from travis
This commit is contained in:
parent
519a79f685
commit
d0acad597d
2 changed files with 85 additions and 9 deletions
83
.github/workflows/test.yaml
vendored
Normal file
83
.github/workflows/test.yaml
vendored
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
on: [push, pull_request]
|
||||||
|
name: Test
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: 1.14.x
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Lint Dependencies
|
||||||
|
run: make build-deps
|
||||||
|
- name: Lint
|
||||||
|
run: |
|
||||||
|
export PATH=$PATH:$(go env GOPATH)/bin
|
||||||
|
make lint
|
||||||
|
- name: Spellcheck
|
||||||
|
run: |
|
||||||
|
export PATH=$PATH:$(go env GOPATH)/bin
|
||||||
|
make spellcheck
|
||||||
|
test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go-version: [1.14.x]
|
||||||
|
platform: [ubuntu-latest, macos-latest, ubuntu-16.04]
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
steps:
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go-version }}
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Test
|
||||||
|
run: make test
|
||||||
|
|
||||||
|
cover:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go-version: [1.14.x]
|
||||||
|
platform: [ubuntu-latest]
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
steps:
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go-version }}
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Test
|
||||||
|
run: make cover
|
||||||
|
- name: CodeCov
|
||||||
|
uses: codecov/codecov-action@v1.0.4
|
||||||
|
with:
|
||||||
|
# The token below is used exclusively for uploading coverage reports.
|
||||||
|
token: "d82eb1d7-5990-4a31-baa4-156473402105"
|
||||||
|
file: ./coverage.txt
|
||||||
|
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go-version: [1.14.x]
|
||||||
|
platform: [ubuntu-latest, macos-latest, ubuntu-16.04]
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
steps:
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go-version }}
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: build
|
||||||
|
run: make build
|
||||||
|
|
||||||
|
build-docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: build
|
||||||
|
run: docker build .
|
11
.travis.yml
11
.travis.yml
|
@ -1,6 +1,6 @@
|
||||||
stages:
|
stages:
|
||||||
- test
|
- name: test
|
||||||
- "Docker Test Build"
|
if: fork = false AND type = push
|
||||||
- name: "Docker Build and Publish"
|
- name: "Docker Build and Publish"
|
||||||
if: fork = false AND type = push
|
if: fork = false AND type = push
|
||||||
|
|
||||||
|
@ -61,13 +61,6 @@ matrix:
|
||||||
- go: tip
|
- go: tip
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- name: "Test Build amd64"
|
|
||||||
stage: "Docker Test Build"
|
|
||||||
install: *docker_setup
|
|
||||||
go: 1.x
|
|
||||||
script:
|
|
||||||
- .travis/docker_build.sh ${TRAVIS_REPO_SLUG}:${TRAVIS_COMMIT} Dockerfile
|
|
||||||
|
|
||||||
- name: "Build Master amd64"
|
- name: "Build Master amd64"
|
||||||
stage: "Docker Build and Publish"
|
stage: "Docker Build and Publish"
|
||||||
if: branch = master
|
if: branch = master
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue