[release-1.9] chore(e2e): add e2e tests for autologout feature #16718
Workflow file for this run
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
| # Copyright Red Hat, Inc. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: PR | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: | |
| - main | |
| - release-1.9 | |
| - release-1.1[0-9] | |
| env: | |
| TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }} | |
| TURBO_SCM_HEAD: ${{ github.sha }} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.number || github.event.pull_request.head.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build with Node.js ${{ matrix.node-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Check Image and Relevant Changes | |
| id: check-image | |
| uses: ./.github/actions/check-image-and-changes | |
| - name: Setup Node.js | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Setup local Turbo cache | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1 | |
| - name: Use app-config.example.yaml | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: rm app-config.yaml && mv app-config.example.yaml app-config.yaml | |
| - name: Install dependencies | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| uses: backstage/actions/yarn-install@b3c1841fd69e1658ac631afafd0fb140a2309024 # v0.6.17 | |
| with: | |
| cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} | |
| - name: Build packages | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: yarn run build --continue --affected | |
| test: | |
| name: Test with Node.js ${{ matrix.node-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Check Image and Relevant Changes | |
| id: check-image | |
| uses: ./.github/actions/check-image-and-changes | |
| - name: Setup Node.js | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Setup local Turbo cache | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1 | |
| - name: Use app-config.example.yaml | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: rm app-config.yaml && mv app-config.example.yaml app-config.yaml | |
| - name: Install dependencies | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| uses: backstage/actions/yarn-install@b3c1841fd69e1658ac631afafd0fb140a2309024 # v0.6.17 | |
| with: | |
| cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} | |
| - name: Install Python dependencies | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: pip install -r python/requirements-dev.in -r python/requirements-build.in -r python/requirements.txt | |
| - name: Run prettier | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: yarn prettier:check --continue --affected | |
| - name: Run lint | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: yarn run lint:check --continue --affected | |
| - name: Run monorepo tools | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: yarn run monorepo:check | |
| - name: Regenerate dockerfiles | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: | | |
| yarn run build:dockerfile; if [[ $(git diff --name-only | grep Dockerfile || true) != "" ]]; then \ | |
| echo "ERROR: Workspace is dirty! Must run 'yarn build:dockerfile' and commit changes!"; exit 1; \ | |
| fi | |
| - name: Run tests | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: yarn run test --continue --affected | |
| - name: Run Python tests | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: pytest docker/test_install-dynamic-plugins.py -v | |
| - name: Change directory to dynamic-plugins | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: cd ./dynamic-plugins | |
| - name: Install dynamic plugin dependencies | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: yarn install | |
| - name: Test the dynamic plugin wrappers | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: yarn test --continue --affected | |
| - name: Export the dynamic plugin wrappers | |
| if: ${{ steps.check-image.outputs.is_skipped != 'true' }} | |
| run: yarn export-dynamic --continue --affected |