Removed debug output #253
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: Go | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
go: ["1.20", "1.21"] | ||
db: ["7.1.23", "8.22.0"] | ||
env: | ||
DEFAULT_GO: "1.21" | ||
DEFAULT_DB: "8.22.0" | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-go-${{ matrix.go }}-db-${{ matrix.db }} | ||
cancel-in-progress: true | ||
name: Build with go version ${{ matrix.go }} and db ${{ matrix.db }} | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
id: go | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go-${{ matrix.go }} | ||
${{ runner.os }}-go- | ||
- name: Enable testcontainer reuse | ||
run: echo 'testcontainers.reuse.enable=true' > "$HOME/.testcontainers.properties" | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
skip-pkg-cache: true # Caching already done by actions/cache | ||
skip-build-cache: true | ||
- name: Go build | ||
run: | | ||
go clean | ||
go build | ||
go build ./... | ||
- name: Go test -short | ||
run: go test -v -count 1 -short ./... | ||
- name: Go test with Exasol version ${{ matrix.db }} | ||
env: | ||
DB_VERSION: ${{ matrix.db }} | ||
run: go test -v -count 1 -coverprofile=coverage.out ./... | ||
- name: SonarCloud Scan | ||
if: matrix.go == env.DEFAULT_GO && matrix.db == env.DEFAULT_DB && github.repository_owner == 'exasol' && env.SONAR_TOKEN != null | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |