From 728c30695e983fd42ad7ccfae5df4d5f3deb0611 Mon Sep 17 00:00:00 2001 From: ptiurin Date: Thu, 1 Aug 2024 15:43:57 +0100 Subject: [PATCH 1/4] ci: Add Allure and calls from central repo --- .github/workflows/integration-tests-v2.yml | 33 +++++++++++++++++++++- setup.cfg | 1 + 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests-v2.yml b/.github/workflows/integration-tests-v2.yml index d73ea84..55efccb 100644 --- a/.github/workflows/integration-tests-v2.yml +++ b/.github/workflows/integration-tests-v2.yml @@ -8,6 +8,16 @@ on: required: true FIREBOLT_CLIENT_SECRET_STG_NEW_IDN: required: true + inputs: + engine-version: + description: 'Engine version to use for integration tests' + required: false + type: string + default: '' + token: + description: 'GitHub token if called from another workflow' + required: false + type: string jobs: integration-tests: @@ -15,6 +25,8 @@ jobs: steps: - name: Check out code uses: actions/checkout@v2 + with: + repository: firebolt-db/firebolt-sqlalchemy - name: Set up Python 3.8 uses: actions/setup-python@v5 @@ -53,7 +65,7 @@ jobs: FIREBOLT_BASE_URL: "api.staging.firebolt.io" ACCOUNT_NAME: ${{ vars.FIREBOLT_ACCOUNT }} run: | - pytest --last-failed -o log_cli=true -o log_cli_level=INFO tests/integration + pytest --last-failed -o log_cli=true -o log_cli_level=INFO tests/integration --alluredir=allure-results - name: Save failed tests id: cache-tests-save @@ -63,3 +75,22 @@ jobs: path: | .pytest_cache/v/cache/lastfailed key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} + + # Need to pull the pages branch in order to fetch the previous runs + - name: Get Allure history + uses: actions/checkout@v4 + if: always() + continue-on-error: true + with: + ref: gh-pages + path: gh-pages + + - name: Allure Report + uses: firebolt-db/action-allure-report@v1 + if: always() + with: + github-key: ${{ inputs.token || secrets.GITHUB_TOKEN }} + test-type: integration + allure-dir: allure-results + pages-branch: gh-pages + repository-name: firebolt-sqlalchemy diff --git a/setup.cfg b/setup.cfg index 9d3e66c..48204fd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -41,6 +41,7 @@ sqlalchemy.dialects = [options.extras_require] dev = + allure-pytest==2.* devtools==0.7.0 greenlet==2.0.2 mock==4.0.3 From 793681ef4ad2b91c87546d87d8d6a72809f57740 Mon Sep 17 00:00:00 2001 From: ptiurin Date: Thu, 1 Aug 2024 16:12:01 +0100 Subject: [PATCH 2/4] try explicit pip --- .github/workflows/integration-tests-v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests-v2.yml b/.github/workflows/integration-tests-v2.yml index 55efccb..259a393 100644 --- a/.github/workflows/integration-tests-v2.yml +++ b/.github/workflows/integration-tests-v2.yml @@ -36,7 +36,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install ".[dev]" + python -m pip install ".[dev]" - name: Setup database and engine id: setup From a14d65f417d3a50a7e01ea2944447a0ddf90dd1f Mon Sep 17 00:00:00 2001 From: ptiurin Date: Thu, 1 Aug 2024 16:27:22 +0100 Subject: [PATCH 3/4] test with ref --- .github/workflows/integration-tests-v2.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration-tests-v2.yml b/.github/workflows/integration-tests-v2.yml index 259a393..455520a 100644 --- a/.github/workflows/integration-tests-v2.yml +++ b/.github/workflows/integration-tests-v2.yml @@ -27,6 +27,7 @@ jobs: uses: actions/checkout@v2 with: repository: firebolt-db/firebolt-sqlalchemy + ref: ci-call-from-another-repo - name: Set up Python 3.8 uses: actions/setup-python@v5 From fabaae90a75d2120e0c2ad28933ac6bd5582452e Mon Sep 17 00:00:00 2001 From: ptiurin Date: Thu, 1 Aug 2024 16:53:28 +0100 Subject: [PATCH 4/4] remove redundant ref --- .github/workflows/integration-tests-v2.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/integration-tests-v2.yml b/.github/workflows/integration-tests-v2.yml index 455520a..259a393 100644 --- a/.github/workflows/integration-tests-v2.yml +++ b/.github/workflows/integration-tests-v2.yml @@ -27,7 +27,6 @@ jobs: uses: actions/checkout@v2 with: repository: firebolt-db/firebolt-sqlalchemy - ref: ci-call-from-another-repo - name: Set up Python 3.8 uses: actions/setup-python@v5