vaguerent/.github/workflows/go-spectest.yml
2022-04-25 12:26:27 -05:00

64 lines
1.7 KiB
YAML

on:
push:
branches:
- main
- 'test-*'
paths:
- 'builtin/**'
- 'cmd/**'
- 'internal/**'
- '.github/workflows**'
- 'go.mod'
- 'go.sum'
workflow_dispatch:
branches:
- 'main'
jobs:
tests:
runs-on: ubuntu-18.04
strategy:
matrix:
go: ['^1.16']
ruby: ['2.7']
name: Vagrant acceptance tests
steps:
- name: Code Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{matrix.go}}
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
architecture: 'x64'
- name: Setup ruby vagrant
run: |
gem install --no-document bundler
bundle install
- name: Build Vagrant
run: |
git config --global url."https://${HASHIBOT_USERNAME}:${HASHIBOT_TOKEN}@github.com".insteadOf "https://github.com"
make bin/linux
env:
HASHIBOT_USERNAME: ${{ secrets.HASHIBOT_USERNAME }}
HASHIBOT_TOKEN: ${{ secrets.HASHIBOT_TOKEN }}
- name: Get vagrant-spec repo
uses: actions/checkout@v2
with:
repository: 'hashicorp/vagrant-spec'
path: vagrant-spec
- name: Install and run vagrant-spec
run: |
pushd vagrant-spec
gem build vagrant-spec.gemspec
gem install vagrant-spec-0.0.1.gem
popd
VAGRANT_PATH="$GITHUB_WORKSPACE/vagrant" vagrant-spec test --components=cli/version --config test/vagrant-spec/configs/vagrant-spec.config.virtualbox.rb
env:
VAGRANT_SPEC_BOX: "hashicorp/bionic64"