Add TextArea component #58
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: Test React components library | |
on: | |
pull_request: | |
paths: | |
- packages/react-components/** | |
workflow_dispatch: | |
# Cancel any currently running builds to save GitHub Actions hours. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
jest-unit-tests: | |
name: Jest unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Read .nvmrc | |
run: echo "GITHUB_NVMRC_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV | |
working-directory: ./packages/react-components | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.GITHUB_NVMRC_VERSION }} | |
- name: Install dependencies | |
run: npm install | |
working-directory: ./packages/react-components | |
- name: Run test suite with npm script | |
run: npm run test:ci | |
working-directory: ./packages/react-components | |
playwright-accessibility-tests: | |
name: Playwright accessibility tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Read .nvmrc | |
run: echo "GITHUB_NVMRC_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV | |
working-directory: ./packages/react-components | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.GITHUB_NVMRC_VERSION }} | |
- name: Install dependencies | |
run: npm install | |
working-directory: ./packages/react-components | |
- name: Install Playwright | |
run: npx playwright install --with-deps | |
working-directory: ./packages/react-components | |
- name: Build Storybook | |
run: npm run storybook-build | |
working-directory: ./packages/react-components | |
- name: Serve Storybook and run tests | |
run: | | |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ | |
"npx http-server storybook-static --port 6006 --silent" \ | |
"npx wait-on tcp:6006 && npm run test-storybook:ci" | |
working-directory: ./packages/react-components |