Skip to content

Commit

Permalink
workflow: Add integration tests, bump go version
Browse files Browse the repository at this point in the history
Setup Bats and run integration tests with them after build.

+ bump go compiler to version 1.23
  • Loading branch information
kolayne committed Nov 6, 2024
1 parent bc78eda commit 679f891
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/build_and_maybe_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
build:
env:
RELEASE_OS: ubuntu-24.04
RELEASE_GOVER: "1.22"
RELEASE_GOVER: "1.23"

strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, ubuntu-22.04, ubuntu-20.04 ]
gover: [ "1.22", "1.21", "1.20" ]
gover: [ "1.23", "1.22", "1.21", "1.20" ]

runs-on: ${{ matrix.os }}

Expand All @@ -23,8 +23,17 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.gover }}
- name: Setup Bats
uses: bats-core/bats-action@3.0.0
- name: Build the project
run: go build .
- name: Run integration tests
env:
# For `bats -F pretty`
TERM: xterm-256color
run: |
sudo -b ./docker-on-top
bats -F pretty tests/
- name: Save built binary
if: startsWith(github.ref, 'refs/tags/') && matrix.os == env.RELEASE_OS && matrix.gover == env.RELEASE_GOVER
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 679f891

Please sign in to comment.