Add ci test for spectesting

This commit is contained in:
sophia 2022-02-01 17:24:26 -06:00 committed by Paul Hinze
parent cba6b76a26
commit 17ff196305
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
2 changed files with 68 additions and 0 deletions

67
.github/workflows/go-spectest.yml vendored Normal file
View File

@ -0,0 +1,67 @@
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:
tests:
runs-on: ubuntu-18.04
strategy:
matrix:
go: ['^1.16']
ruby: ['3.0']
name: Vagrant acceptance tests
steps:
- name: Code Checkout
uses: actions/checkout@v2
- 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: Code vagrant-spec repo
uses: actions/checkout@v2
with:
repository: 'hashicorp/vagrant-spec'
path: vagrant-spec
- name: Install vagrant-spec
run: |
gem build vagrant-spec/vagrant-spec.gemspec
gem install vagrant-spec/vagrant-spec*.gem
- name: Run spec tests
run: |
vagrant-spec test --components=cli/box cli/plugin cli/version cli/init --config test/vagrant-spec/configs/vagrant-spec.config.virtualbox.rb
env:
VAGRANT_SPEC_BOX: "hashicorp/bionic64"

View File

@ -5,6 +5,7 @@ Vagrant::Spec::Acceptance.configure do |c|
c.skeleton_paths << File.expand_path("../test/acceptance/skeletons", __FILE__)
# Allow for slow setup to still pass
c.assert_retries = 15
c.vagrant_path = "vagrant"
c.provider "virtualbox",
box: ENV["VAGRANT_SPEC_BOX"],
contexts: ["provider-context/virtualbox"]