58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
name: Vagrant Go acceptance tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'test-*'
|
|
paths:
|
|
- 'builtin/**'
|
|
- 'cmd/**'
|
|
- 'internal/**'
|
|
- '.github/workflows**'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
# Allows manual trigger on arbitrary branches via GitHub UI/API
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
vagrant-spec-tests:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
ruby: ['3.0', '3.1', '3.2']
|
|
name: Vagrant acceptance tests (Ruby ${{ matrix.ruby }})
|
|
steps:
|
|
- name: Code Checkout
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
|
with:
|
|
submodules: 'recursive'
|
|
# Also fetch all tags, since we need our version number in the build
|
|
# to be based off a tag
|
|
fetch-depth: 0
|
|
- name: Setup Go
|
|
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
|
with:
|
|
go-version-file: go.mod
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
|
|
with:
|
|
ruby-version: ${{matrix.ruby}}
|
|
bundler-cache: true
|
|
- name: Build Vagrant
|
|
run: |
|
|
git config --global url."https://${HASHIBOT_USERNAME}:${HASHIBOT_TOKEN}@github.com".insteadOf "https://github.com"
|
|
make
|
|
env:
|
|
HASHIBOT_USERNAME: ${{ secrets.HASHIBOT_USERNAME }}
|
|
HASHIBOT_TOKEN: ${{ secrets.HASHIBOT_TOKEN }}
|
|
- name: Add binstubs to path
|
|
run: |
|
|
echo "$PWD/binstubs" >> $GITHUB_PATH
|
|
env:
|
|
VAGRANT_SPEC_BOX: "hashicorp/bionic64"
|
|
- name: Run vagrant-spec
|
|
run: |
|
|
VAGRANT_PATH="$GITHUB_WORKSPACE/bin/vagrant-go" bundle exec vagrant-spec test --components=cli/version --config test/vagrant-spec/configs/vagrant-spec.config.virtualbox.rb
|
|
env:
|
|
VAGRANT_SPEC_BOX: "hashicorp/bionic64"
|