test: Make a few cosmetic changes and enable race testing
This commit is contained in:
@@ -1,29 +1,41 @@
|
|||||||
|
# Docs: https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||||
|
|
||||||
|
# If the name is omitted, it uses the filename instead.
|
||||||
|
#name: Test
|
||||||
on:
|
on:
|
||||||
|
# Run on all pull requests.
|
||||||
pull_request:
|
pull_request:
|
||||||
|
#branches:
|
||||||
|
#- master
|
||||||
|
# Run on all pushes.
|
||||||
push:
|
push:
|
||||||
|
# Run daily at 4am.
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 0 4 * * *
|
- cron: 0 4 * * *
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
maketest:
|
maketest:
|
||||||
name: Test ${{ matrix.test_block }}
|
name: Test (${{ matrix.test_block }}) on ${{ matrix.os }} with golang ${{ matrix.golang_version }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
GOPATH: /home/runner/work/mgmt/mgmt/go
|
GOPATH: /home/runner/work/mgmt/mgmt/go
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
# TODO: Add tip when it's supported: https://github.com/actions/setup-go/issues/21
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
# macos tests are currently failing in CI
|
# macos tests are currently failing in CI
|
||||||
#- macos-latest
|
#- macos-latest
|
||||||
go_version:
|
golang_version:
|
||||||
|
# TODO: add 1.15.x and tip
|
||||||
# minimum required and latest published go_version
|
# minimum required and latest published go_version
|
||||||
#- 1.13
|
#- 1.13
|
||||||
- 1.15
|
- 1.15
|
||||||
test_block:
|
test_block:
|
||||||
- basic
|
- basic
|
||||||
- shell
|
- shell
|
||||||
#- race
|
- race
|
||||||
|
#fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Do not shallow fetch, will fail when building bindata/
|
# Do not shallow fetch, will fail when building bindata/
|
||||||
@@ -36,10 +48,10 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
path: ./go/src/github.com/purpleidea/mgmt
|
path: ./go/src/github.com/purpleidea/mgmt
|
||||||
|
|
||||||
- name: Install Go ${{ matrix.go_version }}
|
- name: Install Go ${{ matrix.golang_version }}
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go_version }}
|
go-version: ${{ matrix.golang_version }}
|
||||||
|
|
||||||
# Install & configure ruby, fixes gem permissions error
|
# Install & configure ruby, fixes gem permissions error
|
||||||
- name: Install Ruby
|
- name: Install Ruby
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
[](https://goreportcard.com/report/github.com/purpleidea/mgmt)
|
[](https://goreportcard.com/report/github.com/purpleidea/mgmt)
|
||||||
[](http://travis-ci.org/purpleidea/mgmt)
|
[](http://travis-ci.org/purpleidea/mgmt)
|
||||||
|
[](https://github.com/purpleidea/mgmt/actions/)
|
||||||
[](https://godoc.org/github.com/purpleidea/mgmt)
|
[](https://godoc.org/github.com/purpleidea/mgmt)
|
||||||
[](https://webchat.freenode.net/?channels=#mgmtconfig)
|
[](https://webchat.freenode.net/?channels=#mgmtconfig)
|
||||||
[](https://www.patreon.com/purpleidea)
|
[](https://www.patreon.com/purpleidea)
|
||||||
|
|||||||
Reference in New Issue
Block a user