refactor(FormLabel): convert FormLabel to TypeScript #15530
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: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
merge_group: | |
types: [checks_requested] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
dedupe: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Run yarn dedupe | |
run: yarn dedupe --check | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache | |
- name: Check formatting of project files | |
run: yarn format:diff | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache | |
- name: Lint JavaScript files | |
run: yarn lint | |
- name: Lint Sass files | |
run: yarn lint:styles | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: | | |
node_modules | |
*/**/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache | |
- name: Build project | |
run: yarn build | |
- name: Check generated styles | |
run: | | |
yarn carbon-cli check --ignore '**/@(node_modules|examples|components|react|fixtures|compat)/**' 'packages/**/*.scss' | |
- name: Run tests | |
run: yarn test --ci | |
e2e: | |
name: 'test:e2e' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: | | |
node_modules | |
*/**/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache | |
- uses: dorny/[email protected] | |
id: filter | |
with: | |
filters: | | |
e2e: | |
- 'e2e/**' | |
- 'packages/icons/**' | |
- 'packages/icons-react/**' | |
- 'packages/icons-vue/**' | |
- 'packages/pictograms/**' | |
- 'packages/pictograms-react/**' | |
- 'packages/icon-build-helpers/**' | |
- name: Build project | |
if: ${{ steps.filter.outputs.e2e == 'true' }} | |
run: yarn build | |
- name: Run e2e tests | |
if: ${{ steps.filter.outputs.e2e == 'true' }} | |
run: yarn test:e2e | |
vrt-runner: | |
strategy: | |
matrix: | |
shard: [1, 2, 3, 4] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: | | |
node_modules | |
*/**/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache | |
- name: Install browsers | |
run: yarn playwright install --with-deps | |
- name: Build project | |
run: yarn build | |
- name: Build storybook | |
run: | |
STORYBOOK_STORE_7=false yarn workspace @carbon/react storybook:build | |
- name: Run storybook | |
id: storybook | |
run: | | |
npx serve -l 3000 packages/react/storybook-static & | |
pid=$! | |
echo "pid=$pid" >> $GITHUB_OUTPUT | |
- uses: ./actions/wait-for-it | |
with: | |
URL: 'http://localhost:3000' | |
timeout-minutes: 3 | |
- name: Run VRT | |
if: github.repository == 'carbon-design-system/carbon' | |
env: | |
PERCY_TOKEN: c9a21a3fde4fda0a0f822d633426ab26e2ab2c1cba55221d342d4047744c8c24 | |
PERCY_PARALLEL_TOTAL: 4 | |
run: | | |
yarn percy exec --parallel -- yarn playwright test --project chromium --grep @vrt --shard="${{ matrix.shard }}/4" | |
- name: Stop storybook | |
run: kill ${{ steps.storybook.outputs.pid }} | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: playwright-report | |
path: .playwright | |
vrt: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
needs: vrt-runner | |
steps: | |
- name: Check VRT Runner job status | |
if: ${{ needs.vrt-runner.result != 'success' }} | |
run: exit 1 | |
avt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: | | |
node_modules | |
*/**/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache | |
- name: Install browsers | |
run: yarn playwright install --with-deps | |
- name: Build project | |
run: yarn build | |
- name: Build storybook | |
run: | |
STORYBOOK_STORE_7=false yarn workspace @carbon/react storybook:build | |
- name: Run storybook | |
id: storybook | |
run: | | |
npx serve -l 3000 packages/react/storybook-static & | |
pid=$! | |
echo ::set-output name=pid::"$pid" | |
- uses: ./actions/wait-for-it | |
with: | |
URL: 'http://localhost:3000' | |
timeout-minutes: 3 | |
- name: Run AVT | |
if: github.repository == 'carbon-design-system/carbon' | |
run: | | |
yarn playwright test --project chromium --grep @avt | |
- name: Stop storybook | |
run: kill ${{ steps.storybook.outputs.pid }} | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: playwright-report | |
path: .playwright |