vaguerent/.github/workflows/go-testing.yml
Chris Roberts beaa942ec8 Handle skipped required tests
Required tests that are skipped based on path matching need to have an
inverse match with the same name that always succeeds to allow the tests
to be marked as passing.
2023-06-12 14:24:21 -07:00

47 lines
974 B
YAML

name: Vagrant Go unit tests
on:
push:
branches:
- main
- 'test-*'
paths:
- 'builtin/**'
- 'cmd/**'
- 'internal/**'
- '.github/workflows**'
- 'go.mod'
- 'go.sum'
pull_request:
branches:
- main
paths:
- 'builtin/**'
- 'cmd/**'
- 'internal/**'
- 'go.mod'
- 'go.sum'
jobs:
unit-tests-go:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.0', '3.1', '3.2']
name: Vagrant unit tests on Go (Ruby ${{ matrix.ruby }})
steps:
- name: Code Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true
- name: Vet
run: go vet -mod=mod ./...
- name: Test
run: go test -mod=mod ./...