Skip to content

Merge pull request #340 from warrensbox/fix/Update_and_fix_PR335 #13

Merge pull request #340 from warrensbox/fix/Update_and_fix_PR335

Merge pull request #340 from warrensbox/fix/Update_and_fix_PR335 #13

Workflow file for this run

name: Run test
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!release' # excludes master
jobs:
integration_tests_linux:
strategy:
matrix:
os: [ubuntu-latest]
go_version: ['1.22']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go_version }}
- name: Build code
run: go build -v ./...
- name: Running test
run: |
set -e
go get -v -t -d ./...
go vet -tests=false ./...
go test -v ./...
mkdir -p build
go build -v -o build/tfswitch
mkdir `pwd`/bin/
find ./test-data/* -type d -print0 | while read -r -d $'\0' TEST_PATH; do
./build/tfswitch -c "${TEST_PATH}" -b `pwd`/bin/terraform || exit 1
done
integration_tests_windows:
strategy:
matrix:
os: [windows-latest]
go_version: ['1.22']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go_version }}
- name: Build code
run: go build -v ./...
- name: Running test
run: |
go test -v ./...