filter out dimension names that do not have dimension values #4398
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
name: Build and Test web code | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/web-test.yml" | |
- "admin/**" | |
- "cli/**" | |
- "runtime/**" | |
- "web-admin/**" | |
- "web-auth/**" | |
- "web-common/**" | |
- "web-local/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Filter modified codepaths | |
uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
admin: | |
- ".github/workflows/web-test.yml" | |
- "admin/**" | |
- "cli/**" | |
- "runtime/**" | |
- "web-admin/**" | |
auth: | |
- ".github/workflows/web-test.yml" | |
- "web-auth/**" | |
local: | |
- ".github/workflows/web-test.yml" | |
- "cli/**" | |
- "runtime/**" | |
- "web-local/**" | |
common: | |
- ".github/workflows/web-test.yml" | |
- "cli/**" | |
- "runtime/**" | |
- "web-common/**" | |
- name: Set up NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Set up go for E2E | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21 | |
- name: go build cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: NPM Install | |
run: npm install | |
- name: Build and embed static UI | |
run: make cli | |
- name: Install browser for UI tests | |
run: npx playwright install | |
- name: Prettier checks and lint for web common | |
if: steps.filter.outputs.common == 'true' | |
run: |- | |
npx prettier --check "web-common/**/*" | |
npx eslint web-common --quiet | |
npx svelte-check --threshold error --workspace web-common --no-tsconfig --ignore "src/components/data-graphic,src/features/dashboards/time-series,src/features/dashboards/time-controls/TimeRangeSelector.svelte,src/features/dashboards/time-controls/TimeControls.svelte" | |
- name: Prettier checks and lint for web local | |
if: steps.filter.outputs.local == 'true' | |
run: |- | |
npx prettier --check "web-local/**/*" | |
npx eslint web-local --quiet | |
npx svelte-check --workspace web-local --no-tsconfig --ignore "src/routes/dev" | |
- name: Prettier checks and lint for web admin | |
if: steps.filter.outputs.admin == 'true' | |
run: |- | |
npx prettier --check "web-admin/**/*" | |
npx eslint web-admin --quiet | |
npx svelte-check --workspace web-admin --no-tsconfig | |
- name: Prettier checks and lint for web auth | |
if: steps.filter.outputs.auth == 'true' | |
run: |- | |
npx prettier --check "web-auth/**/*" | |
npx eslint web-auth --quiet | |
npx svelte-check --workspace web-auth --no-tsconfig | |
- name: Test web common | |
if: steps.filter.outputs.common == 'true' | |
run: npm run test -w web-common | |
- name: Test web local | |
if: ${{ steps.filter.outputs.local == 'true' || steps.filter.outputs.common == 'true' }} | |
run: npm run test -w web-local | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: web-local/playwright-report/ | |
retention-days: 30 | |
- name: Build & Test the web admin | |
if: ${{ steps.filter.outputs.admin == 'true' || steps.filter.outputs.common == 'true' }} | |
run: |- | |
npm run build -w web-admin | |
npm run test -w web-admin | |
- name: Build & Test storybook | |
run: |- | |
npm run storybook:smoketest -w web-common |