Skip to content

Migrate BashTub Tests to TestContainers Based Tests #8

Migrate BashTub Tests to TestContainers Based Tests

Migrate BashTub Tests to TestContainers Based Tests #8

name: Test Containers Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
repository_dispatch:
types: [ok-to-test]
jobs:
test-build-and-run-testcontainers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Detect Go version from test_integration/go.mod
- name: Detect Go version from test_integration/go.mod
id: detect-test-go-version
run: |
go_version=$(grep '^go ' test_integration/go.mod | awk '{print $2}')
echo "Go version detected for integration tests: $go_version"
echo "GOLANG_TEST_VERSION=$go_version" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_TEST_VERSION }}
cache: true
- name: Run Go tests in integration test directory
run: |
# TODO: make WebUI happy when compiling
mkdir -p webui/build
echo "hello test" > webui/build/index.html
cd test_integration
go test -v -count=1 ./...