Skip to content

e2e tests without init container #179

e2e tests without init container

e2e tests without init container #179

Workflow file for this run

name: Run Build and Test
on:
push:
branches:
- 'main'
pull_request:
branches:
- "*"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go 1.22.0
uses: actions/setup-go@v5
with:
go-version: "1.22.0"
- shell: bash
run: |
make build
cli-test:
needs: build
name: CLI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go 1.22.0
uses: actions/setup-go@v5
with:
go-version: "1.22.0"
- shell: bash
run: |
go install gotest.tools/gotestsum@latest
- shell: bash
run: |
echo 'run suite cmd'
export USE_TESTCONTAINERS=1
gotestsum \
--junitfile="reports/cmd.xml" \
--junitfile-project-name="cli" \
--junitfile-testsuite-name="short" \
--rerun-fails \
--format github-actions \
--packages="./transfer_manager/go/cmd/..." \
-- -timeout=30m
- name: Upload CLI Test Results
uses: actions/upload-artifact@v3
if: always()
with:
name: cli-test-reports
path: reports/cmd.xml
e2e-tests:
needs: build
name: e2e
strategy:
fail-fast: false
max-parallel: 1
matrix:
suite: [kafka2ch, mongo2ch]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go 1.22.0
uses: actions/setup-go@v5
with:
go-version: "1.22.0"
- shell: bash
run: |
go install gotest.tools/gotestsum@latest
- shell: bash
run: |
curl https://clickhouse.com/ | sh
sudo ./clickhouse install
- shell: bash
run: |
echo 'run suite ${{ matrix.suite }}'
export RECIPE_CLICKHOUSE_BIN=clickhouse
export USE_TESTCONTAINERS=1
gotestsum \
--junitfile="reports/${{ matrix.suite }}.xml" \
--junitfile-project-name="e2e" \
--junitfile-testsuite-name="short" \
--rerun-fails \
--format github-actions \
--packages="./transfer_manager/go/tests/e2e/${{ matrix.suite }}/..." \
-- -timeout=15m
- name: Upload e2e Test Results
uses: actions/upload-artifact@v3
if: always()
with:
name: e2e-test-reports
path: reports/${{ matrix.suite }}.xml
canon-tests:
needs: build
name: canon
strategy:
fail-fast: false
matrix:
suite: [parser, postgres]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go 1.22.0
uses: actions/setup-go@v5
with:
go-version: "1.22.0"
- shell: bash
run: |
go install gotest.tools/gotestsum@latest
- shell: bash
run: |
curl https://clickhouse.com/ | sh
sudo ./clickhouse install
- shell: bash
run: |
echo 'run canon-suite ${{ matrix.suite }}'
export RECIPE_CLICKHOUSE_BIN=clickhouse
export USE_TESTCONTAINERS=1
gotestsum \
--junitfile="reports/${{ matrix.suite }}.xml" \
--junitfile-project-name="canon" \
--junitfile-testsuite-name="short" \
--rerun-fails \
--format github-actions \
--packages="./transfer_manager/go/tests/canon/${{ matrix.suite }}/..." \
-- -timeout=15m
- name: Upload Canon Test Results
uses: actions/upload-artifact@v3
if: always()
with:
name: canon-test-reports
path: reports/${{ matrix.suite }}.xml
pkg-tests:
needs: build
name: pkg
strategy:
max-parallel: 8
fail-fast: false
matrix:
suite: [
providers/mongo, providers/mysql, providers/sample, providers/kafka, providers/kinesis,
transformer, predicate, dblog, functions, maplock, middlewares, parsequeue, util, stringutil,
serializer, schemaregistry, parsers/generic, parsers/scanner
]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go 1.22.0
uses: actions/setup-go@v5
with:
go-version: "1.22.0"
- shell: bash
run: |
go install gotest.tools/gotestsum@latest
- shell: bash
run: |
curl https://clickhouse.com/ | sh
sudo ./clickhouse install
- shell: bash
run: |
echo 'run pkg-suite ${{ matrix.suite }}'
export RECIPE_CLICKHOUSE_BIN=clickhouse
export USE_TESTCONTAINERS=1
gotestsum \
--junitfile="reports/${{ matrix.suite }}.xml" \
--junitfile-project-name="pkg" \
--junitfile-testsuite-name="short" \
--rerun-fails \
--format github-actions \
--packages="./transfer_manager/go/pkg/${{ matrix.suite }}/..." \
-- -timeout=10m
- name: Upload Pkg Test Results
uses: actions/upload-artifact@v3
if: always()
with:
name: pkg-test-reports
path: reports/${{ matrix.suite }}.xml
test-report:
needs: [pkg-tests, canon-tests, e2e-tests, cli-test]
name: test-report
if: always() && !contains(needs.*.result, 'skipped')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download CLI Test Reports
uses: actions/download-artifact@v3
with:
name: cli-test-reports
path: reports/
- name: Download e2e Test Reports
uses: actions/download-artifact@v3
with:
name: e2e-test-reports
path: reports/
- name: Download Canon Test Reports
uses: actions/download-artifact@v3
with:
name: canon-test-reports
path: reports/
- name: Download Pkg Test Reports
uses: actions/download-artifact@v3
with:
name: pkg-test-reports
path: reports/
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "reports/*.xml"
if: always()