PCSM-219: Align all env var config with CLI and HTTP request options #95
This file contains hidden or 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
| name: CI | |
| permissions: | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| pcsm_branch: | |
| description: "PCSM branch" | |
| required: false | |
| tests_ver: | |
| description: "QA tests version" | |
| required: false | |
| pull_request: | |
| types: [opened, reopened, synchronize, ready_for_review] | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "tests/**" | |
| - "packaging/**" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 180 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| psmdb: ["6.0", "7.0", "8.0"] | |
| shard: [0, 1, 2, 3, 4] | |
| env: | |
| PCSM_BRANCH: ${{ github.event_name == 'pull_request' && github.head_ref || github.event.inputs.pcsm_branch || 'main' }} | |
| steps: | |
| - name: Checkout testing repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Percona-QA/psmdb-testing | |
| ref: ${{ github.event.inputs.tests_ver || 'main'}} | |
| path: psmdb-testing | |
| - name: Setup environment with PSMDB ${{ matrix.psmdb }} and PCSM PR/branch ${{ github.head_ref || github.event.inputs.pcsm_branch || env.PCSM_BRANCH }} | |
| run: | | |
| MONGODB_IMAGE=perconalab/percona-server-mongodb:${{ matrix.psmdb }} docker compose build easyrsa | |
| MONGODB_IMAGE=perconalab/percona-server-mongodb:${{ matrix.psmdb }} docker compose build | |
| docker compose up -d | |
| working-directory: psmdb-testing/pcsm-pytest | |
| - name: Run pytest shard ${{ matrix.shard }} on PSMDB ${{ matrix.psmdb }} and PCSM PR/branch ${{ github.head_ref || github.event.inputs.pcsm_branch || env.PCSM_BRANCH }} | |
| run: | | |
| docker compose run --rm test pytest -s -v --junitxml=junit.xml --shard-id=${{ matrix.shard }} --num-shards=5 -m 'not jenkins' | |
| working-directory: psmdb-testing/pcsm-pytest | |
| - name: Publish Test Report | |
| uses: mikepenz/action-junit-report@v5 | |
| if: success() || failure() | |
| with: | |
| report_paths: '**/junit.xml' | |
| include_passed: True | |
| detailed_summary: True | |
| include_time_in_summary: True |