QA Checks - "main" #2
This file contains hidden or 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: QA Checks | |
| on: | |
| pull_request: | |
| branches: [main, develop] | |
| push: | |
| branches: [main, develop] | |
| workflow_dispatch: | |
| run-name: QA Checks - "${{ github.ref_name }}" | |
| jobs: | |
| check-code: | |
| name: Check Code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Use Node 22.13.1 | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22.13.1 | |
| cache: "npm" | |
| cache-dependency-path: "**/package-lock.json" | |
| - name: Install npm dependencies | |
| working-directory: ./packages/sds-web-components | |
| run: npm ci | |
| - name: Lint JS/TS | |
| working-directory: ./packages/sds-web-components | |
| run: npm run lint:js | |
| - name: Lint styles | |
| working-directory: ./packages/sds-web-components | |
| run: npm run lint:styles | |
| - name: Check formatting | |
| working-directory: ./packages/sds-web-components | |
| run: npm run lint:formatting | |
| - name: Build project | |
| working-directory: ./packages/sds-web-components | |
| run: npm run build | |
| - name: Install Playwright for Storybook Tests | |
| working-directory: ./packages/sds-web-components | |
| run: npx playwright install --with-deps | |
| - name: Build Storybook | |
| working-directory: ./packages/sds-web-components | |
| run: npm run build-storybook --loglevel verbose --debug-webpack | |
| - name: Serve Storybook and run tests | |
| working-directory: ./packages/sds-web-components | |
| run: | | |
| npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ | |
| "npx http-server storybook-static --port 6006 --silent" \ | |
| "npx wait-on tcp:127.0.0.1:6006 && npm run test-storybook" |