Skip to content

Bulker Test

Bulker Test #242

name: Bulker Test
on:
push:
branches:
- 'main'
workflow_dispatch:
env:
BULKER_TEST_BIGQUERY: ${{ secrets.BULKER_TEST_BIGQUERY }}
BULKER_TEST_REDSHIFT: ${{ secrets.BULKER_TEST_REDSHIFT }}
# BULKER_TEST_REDSHIFT_SERVERLESS: ${{ secrets.BULKER_TEST_REDSHIFT_SERVERLESS }}
BULKER_TEST_SNOWFLAKE: ${{ secrets.BULKER_TEST_SNOWFLAKE }}
BULKER_TEST_MILLION_ROWS_BATCHED: postgres
jobs:
bulker-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.4
cache: false
- name: Bulker Test
run: |
go work init jitsubase kafkabase eventslog bulkerlib bulkerapp
go test -parallel=10 -timeout 60m -json ./jitsubase/... ./kafkabase/... ./eventslog/... ./bulkerlib/... ./bulkerapp/... > test_report.json
- name: Test Report
if: ${{ always() }}
run: |
go install github.com/vakenbolt/go-test-report@latest
cat test_report.json | ~/go/bin/go-test-report
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: test-report
path: |
test_report.html
test_report.json
- name: Notify Slack
uses: rtCamp/action-slack-notify@v2
if: always()
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
SLACK_ICON_EMOJI: ":github-mark:"
SLACK_MESSAGE: "${{ job.status }}: Bulker Test: ${{ github.event.head_commit.message }}"
docker:
needs: bulker-test
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v3
with:
file: "bulker.Dockerfile"
push: true
tags: jitsucom/bulker:latest