Bumps [cypress-io/github-action](https://github.com/cypress-io/github-action) from 6.7.16 to 6.10.2.
- [Release notes](https://github.com/cypress-io/github-action/releases)
- [Changelog](https://github.com/cypress-io/github-action/blob/master/CHANGELOG.md)
- [Commits](108b8684ae...b8ba51a856)
---
updated-dependencies:
- dependency-name: cypress-io/github-action
dependency-version: 6.10.2
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
136 lines
4.3 KiB
YAML
136 lines
4.3 KiB
YAML
name: run-dashboard-search-e2e
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows:
|
|
- trigger-dashboard-search-e2e
|
|
types:
|
|
- completed
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
ARCH: linux-amd64
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
setup:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.pull_request.draft == false
|
|
outputs:
|
|
ini_files: ${{ steps.get_files.outputs.ini_files }}
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: Pin Go version to mod file
|
|
uses: actions/setup-go@v5.5.0
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
cache: true
|
|
- run: go version
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: 'yarn'
|
|
- name: Cache Node Modules
|
|
id: cache-node-modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
node_modules
|
|
/home/runner/.cache/Cypress
|
|
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
|
- name: Install dependencies
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
run: yarn install --immutable
|
|
- name: Install Cypress dependencies
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c
|
|
with:
|
|
runTests: false
|
|
- name: Cache Grafana Build and Dependencies
|
|
id: cache-grafana
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
bin/
|
|
scripts/grafana-server/
|
|
tools/
|
|
public/
|
|
conf/
|
|
e2e-playwright/test-plugins/
|
|
devenv/
|
|
key: ${{ runner.os }}-grafana-${{ hashFiles('go.mod', 'package-lock.json', 'Makefile', 'pkg/storage/**/*.go', 'public/app/features/search/**/*.ts', 'public/app/features/search/**/*.tsx') }}
|
|
# only rebuild grafana if search files have changed ( or dependencies )
|
|
- name: Build Grafana (Runs Only If Not Cached)
|
|
if: steps.cache-grafana.outputs.cache-hit != 'true'
|
|
run: make build
|
|
|
|
- name: Get list of .ini files
|
|
id: get_files
|
|
env:
|
|
WORKSPACE: ${{ github.workspace }}
|
|
run: |
|
|
INI_FILES="$(find "$WORKSPACE"/e2e/dashboards-search-suite/ -type f -name '*.ini' | jq -R -s -c 'split("\n")[:-1]')"
|
|
echo "ini_files=$INI_FILES" >> "$GITHUB_OUTPUT"
|
|
shell: bash
|
|
|
|
run_tests:
|
|
needs: setup
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
if: github.event.pull_request.draft == false
|
|
strategy:
|
|
matrix:
|
|
ini_file: ${{ fromJson(needs.setup.outputs.ini_files) }}
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: Restore Cached Node Modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
node_modules
|
|
/home/runner/.cache/Cypress
|
|
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
|
|
|
- name: Restore Cached Grafana Build and Dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
bin/
|
|
scripts/grafana-server/
|
|
tools/
|
|
public/
|
|
conf/
|
|
e2e-playwright/test-plugins/
|
|
devenv/
|
|
key: ${{ runner.os }}-grafana-${{ hashFiles('go.mod', 'package-lock.json', 'Makefile', 'pkg/storage/**/*.go', 'public/app/features/search/**/*.ts', 'public/app/features/search/**/*.tsx') }}
|
|
- name: Set the step name
|
|
id: set_file_name
|
|
env:
|
|
INI_NAME: ${{ matrix.ini_file }}
|
|
run: |
|
|
FILE_NAME="$(basename "$INI_NAME" .ini)"
|
|
echo "FILE_NAME=$FILE_NAME" >> "$GITHUB_OUTPUT"
|
|
- name: Run tests for ${{ steps.set_file_name.outputs.FILE_NAME }}
|
|
env:
|
|
INI_NAME: ${{ matrix.ini_file }}
|
|
WORKSPACE: ${{ github.workspace }}
|
|
run: |
|
|
cp -rf "$INI_NAME" "$WORKSPACE"/scripts/grafana-server/custom.ini
|
|
yarn e2e:dashboards-search || echo "Test failed but marking as success since unified search is behind a feature flag and should not block PRs"
|