diff --git a/.github/workflows/tests.yml b/.github/workflows/test.yaml similarity index 66% rename from .github/workflows/tests.yml rename to .github/workflows/test.yaml index c2848454..2ddb1db2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/test.yaml @@ -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: + # Run on all pull requests. pull_request: + #branches: + #- master + # Run on all pushes. push: + # Run daily at 4am. schedule: - cron: 0 4 * * * jobs: maketest: - name: Test ${{ matrix.test_block }} + name: Test (${{ matrix.test_block }}) on ${{ matrix.os }} with golang ${{ matrix.golang_version }} runs-on: ${{ matrix.os }} env: GOPATH: /home/runner/work/mgmt/mgmt/go strategy: matrix: + # TODO: Add tip when it's supported: https://github.com/actions/setup-go/issues/21 os: - ubuntu-latest # macos tests are currently failing in CI #- macos-latest - go_version: + golang_version: + # TODO: add 1.15.x and tip # minimum required and latest published go_version #- 1.13 - 1.15 test_block: - basic - shell - #- race + - race + #fail-fast: false steps: # Do not shallow fetch, will fail when building bindata/ @@ -36,10 +48,10 @@ jobs: fetch-depth: 0 path: ./go/src/github.com/purpleidea/mgmt - - name: Install Go ${{ matrix.go_version }} + - name: Install Go ${{ matrix.golang_version }} uses: actions/setup-go@v2 with: - go-version: ${{ matrix.go_version }} + go-version: ${{ matrix.golang_version }} # Install & configure ruby, fixes gem permissions error - name: Install Ruby diff --git a/README.md b/README.md index bb83eb59..8e086596 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/purpleidea/mgmt?style=flat-square)](https://goreportcard.com/report/github.com/purpleidea/mgmt) [![Build Status](https://img.shields.io/travis/purpleidea/mgmt/master.svg?style=flat-square)](http://travis-ci.org/purpleidea/mgmt) +[![Build Status](https://github.com/purpleidea/mgmt/workflows/.github/workflows/test.yaml/badge.svg)](https://github.com/purpleidea/mgmt/actions/) [![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square)](https://godoc.org/github.com/purpleidea/mgmt) [![IRC](https://img.shields.io/badge/irc-%23mgmtconfig-orange.svg?style=flat-square)](https://webchat.freenode.net/?channels=#mgmtconfig) [![Patreon](https://img.shields.io/badge/patreon-donate-yellow.svg?style=flat-square)](https://www.patreon.com/purpleidea)