Fixed Algolia search box styling #7866
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
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
merge_group: | |
jobs: | |
install: | |
name: Install node modules | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node 18.X | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
apps/*/node_modules | |
playgrounds/*/node_modules | |
key: modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: yarn | |
install-windows: | |
name: Install node modules (windows) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node 18.X | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
apps/*/node_modules | |
playgrounds/*/node_modules | |
key: modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- name: yarn | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 15 | |
max_attempts: 3 | |
command: yarn | |
audit: | |
name: Audit node modules | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node 18.X | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
apps/*/node_modules | |
playgrounds/*/node_modules | |
key: modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- run: yarn audit | |
build: | |
name: Build and lint packages | |
needs: [install, install-windows] | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node 18.X | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
apps/*/node_modules | |
playgrounds/*/node_modules | |
key: modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- run: yarn lint | |
- run: yarn lint:copyright | |
- run: yarn build --filter="{./packages/*}..." | |
apps: | |
name: Build website and playgrounds | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node 18.X | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
apps/*/node_modules | |
playgrounds/*/node_modules | |
key: modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- run: yarn build --filter=website --filter="{./playgrounds/*}..." | |
deploy-gh-pages: | |
name: Push static files to github pages | |
needs: install | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
base_folder: ${{ github.event.number || github.ref_name != 'main' && github.ref_name || '' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node 18.X | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
apps/*/node_modules | |
playgrounds/*/node_modules | |
key: modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- name: Build html test pages | |
run: yarn build --filter=itwinui-css | |
- name: Build portal | |
run: yarn workspace portal build --base "/iTwinUI/${{ env.base_folder }}" | |
- name: Build storybook | |
run: yarn build --filter=storybook | |
- name: List folders to preserve (open PRs and 'dev') | |
id: clean_exclude_folders | |
uses: actions/github-script@v4 | |
with: | |
result-encoding: string | |
script: | | |
return ['dev', ...((await github.pulls.list({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
state: 'open' | |
})).data.map(pr => pr.number).join('\n'))] | |
- name: Host portal under / or /dev | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
single-commit: true | |
folder: ${{ github.workspace }}/apps/portal/dist | |
target-folder: ${{ env.base_folder }} | |
clean-exclude: ${{ steps.clean_exclude_folders.outputs.result }} | |
git-config-name: github-actions[bot] | |
git-config-email: github-actions[bot]@users.noreply.github.com | |
- name: Host html pages under /css | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: ${{ github.workspace }}/packages/itwinui-css/backstop/minified | |
target-folder: ${{ env.base_folder }}/css | |
git-config-name: github-actions[bot] | |
git-config-email: github-actions[bot]@users.noreply.github.com | |
- name: Host storybook under /react | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: ${{ github.workspace }}/apps/storybook/storybook-static | |
target-folder: ${{ env.base_folder }}/react | |
git-config-name: github-actions[bot] | |
git-config-email: github-actions[bot]@users.noreply.github.com | |
- name: Post deploy preview link under Checks | |
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' && always() | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
github.rest.repos.createCommitStatus({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
sha: '${{ github.event.pull_request.head.sha }}', | |
state: 'success', | |
context: 'Deploy preview', | |
description: 'Live preview of the current branch', | |
target_url: 'https://itwin.github.io/iTwinUI/${{ github.event.number }}', | |
}) | |
unit-test: | |
name: Run unit tests | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
apps/*/node_modules | |
playgrounds/*/node_modules | |
key: modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- run: yarn workspace @itwin/itwinui-react test --coverage | |
- name: Publish test results | |
uses: EnricoMi/[email protected] | |
if: always() | |
with: | |
files: 'packages/itwinui-react/coverage/junit.xml' | |
comment_mode: off | |
check_name: 'Test results' | |
fail_on: 'nothing' | |
visual-test-css: | |
name: Run visual tests (css) | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
apps/*/node_modules | |
playgrounds/*/node_modules | |
key: modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- name: yarn test --filter=itwinui-css | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 15 | |
max_attempts: 2 | |
retry_on: timeout | |
command: yarn test --filter=itwinui-css | |
- name: Publish test results artifact | |
if: failure() | |
continue-on-error: true | |
uses: actions/[email protected] | |
with: | |
name: 'backstop_test_results' | |
path: '${{ github.workspace }}/packages/itwinui-css/backstop/results/' | |
visual-test-react: | |
name: Run visual tests (react) | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
apps/*/node_modules | |
playgrounds/*/node_modules | |
key: modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- run: yarn test --filter=storybook | |
- name: Publish test results artifact | |
if: failure() | |
continue-on-error: true | |
uses: actions/[email protected] | |
with: | |
name: 'cypress-visual-screenshots' | |
path: '${{ github.workspace }}/apps/storybook/cypress-visual-screenshots' | |
a11y: | |
name: Test for a11y violations | |
needs: install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node 18.X | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-node-modules | |
with: | |
path: | | |
node_modules | |
packages/*/node_modules | |
apps/*/node_modules | |
playgrounds/*/node_modules | |
key: modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- run: yarn build --filter=itwinui-react | |
- uses: cypress-io/github-action@v5 | |
with: | |
working-directory: testing/a11y | |
component: true | |
install-command: yarn |