-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from Altinity/TestFlows_integration
testflows & github action tests
- Loading branch information
Showing
95 changed files
with
4,524 additions
and
2,876 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: TestFlows Tests | ||
|
||
on: | ||
push: | ||
branches: [ main, develop] | ||
pull_request: | ||
branches: [ main , develop] | ||
|
||
env: | ||
SINK_CONNECTOR_VERSION: "2023-02-07" | ||
|
||
jobs: | ||
testflows: | ||
runs-on: [self-hosted, linux, x64] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install docker-compose | ||
working-directory: tests/integration | ||
run: pip3 install docker-compose==1.29.2 | ||
|
||
- name: Install testflows | ||
working-directory: tests/integration | ||
run: pip3 install testflows | ||
|
||
- name: Install awscli | ||
working-directory: tests/integration | ||
run: pip3 install awscli | ||
|
||
- name: Get current date | ||
id: date | ||
run: echo "date=$(date +'%Y-%m-%d_%H%M%S')" >> $GITHUB_OUTPUT | ||
|
||
- name: Add ~./local/bin to the PATH | ||
if: always() | ||
working-directory: tests/integration | ||
run: echo ~/.local/bin >> $GITHUB_PATH | ||
|
||
- name: Run testflows tests | ||
working-directory: tests/integration | ||
run: python3 -u regression.py --only "/mysql to clickhouse replication/*" --clickhouse-binary-path=docker://clickhouse/clickhouse-server:22.8 --test-to-end -o classic --collect-service-logs --attr project="${GITHUB_REPOSITORY}" project.id="$GITHUB_RUN_NUMBER" user.name="$GITHUB_ACTOR" github_actions_run="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" sink_version="altinity/clickhouse-sink-connector:${SINK_CONNECTOR_VERSION}" s3_url="https://altinity-test-reports.s3.amazonaws.com/index.html#altinity-sink-connector/testflows/${{ steps.date.outputs.date }}_${{github.run.number}}/" --log logs/raw.log | ||
|
||
- name: Create tfs results report | ||
if: always() | ||
working-directory: tests/integration/logs | ||
run: cat raw.log | tfs report results | tfs document convert > report.html | ||
|
||
- name: Create tfs coverage report | ||
if: always() | ||
working-directory: tests/integration/logs | ||
run: cat raw.log | tfs report coverage ../requirements/requirements.py | tfs document convert > coverage.html | ||
|
||
- name: Upload artifacts to Altinity Test Reports S3 bucket | ||
if: always() | ||
working-directory: tests/integration/logs | ||
run: aws s3 cp . s3://altinity-test-reports/altinity-sink-connector/testflows/${{ steps.date.outputs.date }}/ --recursive --exclude "*" --include "*.log" --include "*.html" | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_DEFAULT_REGION: 'eu-west-2' | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: testflows-artifacts-${{ steps.date.outputs.date }} | ||
path: | | ||
tests/integration/logs/*.log | ||
if-no-files-found: error | ||
retention-days: 60 | ||
|
||
|
||
|
111 changes: 0 additions & 111 deletions
111
tests/Testflows/mysql_to_clickhouse_replication/regression.py
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
tests/Testflows/mysql_to_clickhouse_replication/requirements/__init__.py
This file was deleted.
Oops, something went wrong.
87 changes: 0 additions & 87 deletions
87
tests/Testflows/mysql_to_clickhouse_replication/tests/autocreate.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.