Skip to content

tests

tests #472

Workflow file for this run

name: 'tests'
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**/*.md'
- 'README.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
- '.static/**'
pull_request:
paths-ignore:
- '**/*.md'
- 'README.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
- '.static/**'
schedule:
- cron: '0 9 * * *'
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
go:
- "1.22"
clickhouse:
- "latest"
steps:
- uses: actions/checkout@v2
- name: Checkout SDK Repo
run: |
make prepare-fivetran-sdk
- name: Install Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Install Protoc-Gen-Go
run: |
make install-protoc-gen-go
- name: Make proto dir
run: |
mkdir -p proto
- name: Generate proto files
run: |
make generate-proto
- name: Go mod tidy
run: |
go mod tidy
# TODO: enable it later. It exceeds timeout on GitHub Actions.
# - name: Run linter
# run: |
# make lint
- name: Start ClickHouse (version - ${{ matrix.clickhouse }}) in Docker
uses: isbang/compose-action@v1.5.1
env:
CLICKHOUSE_VERSION: ${{ matrix.clickhouse }}
with:
compose-file: 'docker-compose.ci.yml'
down-flags: '--volumes'
services: 'clickhouse'
- name: Add ClickHouse to /etc/hosts
run: |
sudo echo "127.0.0.1 clickhouse" | sudo tee -a /etc/hosts
- name: Run Go tests
run: |
make test