mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
Migrate to GitHub Actions (#1473)
* add workflow yml * fix syntax error * update test command
This commit is contained in:
parent
7c58856fb4
commit
75620e6767
53
.github/workflows/echo.yml
vendored
Normal file
53
.github/workflows/echo.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
name: Run Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOPROXY: https://proxy.golang.org
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
go: [1.11, 1.12, 1.13]
|
||||
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go }}
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Set GOPATH and PATH
|
||||
run: |
|
||||
echo "::set-env name=GOPATH::$(dirname $GITHUB_WORKSPACE)"
|
||||
echo "::add-path::$(dirname $GITHUB_WORKSPACE)/bin"
|
||||
shell: bash
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
|
||||
- name: Install Dependencies
|
||||
run: go get -v golang.org/x/lint/golint
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
golint -set_exit_status ./...
|
||||
go test -race --coverprofile=coverage.coverprofile --covermode=atomic ./...
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
if: success() && matrix.go == 1.13 && matrix.os == 'ubuntu-latest'
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token:
|
||||
fail_ci_if_error: false
|
Loading…
Reference in New Issue
Block a user