From 7b0f00bebf36d1d4eeecc8ab29913122d741ffa5 Mon Sep 17 00:00:00 2001 From: Colton Loftus <70598503+C-Loftus@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:43:29 -0500 Subject: [PATCH] separated github actions. fix typo --- .github/workflows/go_tests.yml | 27 +++++++++++++++++++++++++-- cmd/root_test.go | 6 +++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go_tests.yml b/.github/workflows/go_tests.yml index ee65bde..4e78df6 100644 --- a/.github/workflows/go_tests.yml +++ b/.github/workflows/go_tests.yml @@ -3,7 +3,7 @@ name: Go Test on: [push] jobs: - build: + UnitTests: runs-on: ubuntu-latest strategy: @@ -24,4 +24,27 @@ jobs: - name: Build run: go build -v ./... - name: Test with the Go CLI - run: go test ./... -count=1 + run: go test ./... + + E2ETests: + + runs-on: ubuntu-latest + strategy: + matrix: + go-version: [ '1.23' ] + + steps: + - uses: actions/checkout@v4 + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + # You can test your matrix by printing the current Go version + - name: Display Go version + run: go version + - name: Install dependencies + run: go get . + - name: Build + run: go build -v ./... + - name: Test with the Go CLI + run: go test -tags 'e2e' ./... \ No newline at end of file diff --git a/cmd/root_test.go b/cmd/root_test.go index ad893ee..a6ecf65 100644 --- a/cmd/root_test.go +++ b/cmd/root_test.go @@ -1,3 +1,7 @@ +//go:build e2e +// +build e2e + +// run go test -tags=e2e ./... to run e2e tests package cmd import ( @@ -301,7 +305,7 @@ func TestConfigValidThenInvalid(t *testing.T) { SecretKey: minioHandle.Container.Password, Address: strings.Split(url, ":")[0], Port: strings.Split(url, ":")[1], - Config: "../test_helpers/sample_configs/justmainstemsInvalid.yaml", + Config: "../test_helpers/sample_configs/justMainstemsInvalid.yaml", SetupBuckets: true, }