refactor: remove init() logic during startup #110
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: push | |
jobs: | |
unit-test: | |
strategy: | |
matrix: | |
go: [1.19.0] | |
runs-on: ubuntu-latest | |
name: unit -> go ${{ matrix.go }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Run test | |
run: go test -short -cover -coverprofile=coverage.txt -covermode=atomic ./... | |
integration-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
go: [1.19.0] | |
runs-on: ${{ matrix.os }} | |
name: integration -> ${{ matrix.os }} / go ${{ matrix.go }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go }} | |
# for now we only run Integration tests in utils. | |
# Unfortunately we have to go this way, because if you use './...' it will try to build | |
# the unittests for windows in ./cmd (even if there is no integration test there) and fail | |
# in the build phase already with 'unknown field 'Setpgid' in struct literal of type syscall.SysProcAttr' | |
- run: go test -run Integration ./utils | |
shellwrapper-test: | |
runs-on: ubuntu-latest | |
name: shellwrapper | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19.0 # for now we can keep this as a fixed version | |
- name: Install zsh # until https://github.com/actions/virtual-environments/issues/4849 is resolved | |
run: sudo apt-get update; sudo apt-get install zsh | |
- name: Install konf-go | |
run: go install . | |
- name: zsh test | |
run: zsh testhelper/shellwrapper.sh | |
- name: bash test | |
run: bash testhelper/shellwrapper.sh |