feat(Tearsheet): Slug to aiLabel #12648
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 # Run CI Checks | |
on: | |
pull_request: | |
branches: | |
- main | |
- v1 | |
- 'release/v2*' | |
merge_group: | |
types: [checks_requested] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.x' | |
cache: yarn | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: build-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- name: Install | |
run: yarn | |
- name: CI build checks | |
run: yarn ci-check:build | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.x' | |
cache: yarn | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: lint-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- name: Install | |
run: yarn | |
- name: CI lint checks | |
run: yarn ci-check:lint | |
spellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.x' | |
cache: yarn | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: spellcheck-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- name: Install | |
run: yarn | |
- name: CI spellcheck checks | |
run: yarn ci-check:spellcheck | |
test-c4p: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.x' | |
cache: yarn | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: test-c4p-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- name: Install | |
run: yarn | |
- name: CI tests for c4p | |
run: yarn ci-check:test:c4p --collectCoverage | |
- name: Upload coverage reports to Codecov with GitHub Action | |
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: CI snapshot tests for c4p | |
run: yarn ci-check:test:c4p:snapshot | |
test-c4p-wc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.x' | |
cache: yarn | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: | |
test-c4p-wc-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- name: Install | |
run: yarn | |
- name: CI tests for products web components | |
run: yarn ci-check:test:c4p-wc | |
avt-runner: | |
strategy: | |
matrix: | |
shard: [1, 2, 3, 4] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.x' | |
cache: yarn | |
- name: Install | |
run: yarn | |
- name: Install browsers | |
run: yarn playwright install --with-deps | |
- name: Build project | |
run: yarn build | |
- name: Run storybook | |
id: storybook | |
run: | | |
npx serve -l 3000 packages/core/storybook-static & | |
pid=$! | |
echo "pid=$pid" >> $GITHUB_OUTPUT | |
- uses: ./actions/wait-for-it | |
with: | |
URL: 'http://localhost:3000' | |
timeout-minutes: 3 | |
- name: Run AVT | |
if: github.repository == 'carbon-design-system/ibm-products' | |
run: | | |
yarn playwright test --project chromium --grep @avt --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-avt-report | |
path: .playwright | |
avt: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
needs: avt-runner | |
steps: | |
- name: Check AVT Runner job status | |
if: ${{ needs.avt-runner.result != 'success' }} | |
run: exit 1 |