fix(search): Always show search bars #7927
Workflow file for this run
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
# create-gui-pr.yaml is dependant on this name being "Tests" | |
name: 'Tests' | |
# Ensures that only one workflow is run per branch at a time. | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} | |
on: | |
push: | |
branches: [master, 'release-[0-9]+.[0-9]+'] | |
pull_request: | |
types: [opened, reopened, synchronize] | |
permissions: | |
contents: read # for checking out the repository (e.g. actions/checkout) | |
jobs: | |
install-dependencies: | |
runs-on: ubuntu-latest | |
outputs: | |
spec_groups: ${{ steps.set-groups.outputs.result }} | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
node-version-file: '.nvmrc' | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
id: node-modules-cache | |
with: | |
path: | | |
**/node_modules | |
/home/runner/.cache/Cypress | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} | |
- if: steps.node-modules-cache.outputs.cache-hit != 'true' | |
run: | | |
make install | |
- id: set-groups | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
env: | |
THREAD_COUNT: 4 | |
with: | |
script: | | |
const getPartitionedTestFiles = require('./scripts/getPartitionedTestFiles.cjs') | |
return { | |
'kuma-gui': getPartitionedTestFiles(process.env.THREAD_COUNT), | |
} | |
lint-tests: | |
needs: [install-dependencies] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
node-version-file: '.nvmrc' | |
- uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: | | |
**/node_modules | |
/home/runner/.cache/Cypress | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} | |
- run: | | |
make lint | |
cli-tests: | |
needs: [install-dependencies] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
node-version-file: '.nvmrc' | |
- uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: | | |
**/node_modules | |
/home/runner/.cache/Cypress | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} | |
- run: | | |
make test/unit | |
browser-tests: | |
needs: [install-dependencies] | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
package: ['kuma-gui'] | |
container: [0, 1, 2, 3] | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
node-version-file: '.nvmrc' | |
- uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: | | |
**/node_modules | |
/home/runner/.cache/Cypress | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} | |
- env: | |
SPEC_GROUPS: ${{ needs.install-dependencies.outputs.spec_groups }} | |
run: | | |
make run/e2e & | |
make CYPRESS_SPEC="$(echo $SPEC_GROUPS | jq -cMr '.["${{ matrix.package }}"]' | jq -cMr '.[${{ matrix.container }}]')" test/e2e | |
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
if: failure() | |
with: | |
name: cypress-artifacts-${{ matrix.package }}-${{ matrix.container }} | |
retention-days: ${{ github.event_name == 'pull_request' && 3 || 30 }} | |
path: | | |
cypress/screenshots | |
cypress/videos | |
post-checks: | |
# There is a branch protection rule on the repo that requires "branch-protection" to | |
# be successful | |
name: branch-protection | |
# | |
needs: | |
- lint-tests | |
- cli-tests | |
- browser-tests | |
runs-on: ubuntu-latest | |
if: | | |
always() | |
steps: | |
- name: Check for failures | |
if: | | |
contains(needs.*.result, 'failure') || | |
contains(needs.*.result, 'cancelled') | |
run: echo '${{toJSON(needs)}}' && exit 1 | |
- run: echo "Successful" |