Skip to content

Testing Go

Testing Go #101

Workflow file for this run

name: Testing Go
# Trigger on pushes, PRs (excluding documentation changes), and nightly.
on:
push:
branches: [master, main]
pull_request:
schedule:
- cron: 0 0 * * * # daily at 00:00
workflow_dispatch:
permissions:
contents: read
jobs:
test:
strategy:
matrix:
go-version: [1.21.x]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "23.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install protoc-gen-go
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2
- name: Generate protoconf
shell: bash
run: PROTOC=protoc bash test/go-tableau-loader/gen.sh
- name: Vet
run: go vet ./...
- name: Unittest
run: go test -v -timeout 30m -race ./... -coverprofile=coverage.txt -covermode=atomic
- name: Run loader
working-directory: test/go-tableau-loader
run: go run .
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: tableauio/loader