57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
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-18.04
|
|
strategy:
|
|
matrix:
|
|
go: ['^1.16']
|
|
ruby: ['2.7', '3.0']
|
|
name: Vagrant unit tests on Go
|
|
steps:
|
|
- name: Code Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: ${{matrix.go}}
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: ${{matrix.ruby}}
|
|
- name: Setup ruby vagrant
|
|
run: |
|
|
gem install --no-document bundler
|
|
bundle install
|
|
- name: Get dependencies
|
|
run: |
|
|
git config --global url."https://${HASHIBOT_USERNAME}:${HASHIBOT_TOKEN}@github.com".insteadOf "https://github.com"
|
|
go get -v -t -d ./...
|
|
env:
|
|
HASHIBOT_USERNAME: ${{ secrets.HASHIBOT_USERNAME }}
|
|
HASHIBOT_TOKEN: ${{ secrets.HASHIBOT_TOKEN }}
|
|
- name: Vet
|
|
run: go vet ./...
|
|
- name: Test
|
|
run: go test ./...
|