Skip to content

Bump stylelint + fixes #16403

Bump stylelint + fixes

Bump stylelint + fixes #16403

Workflow file for this run

name: Consumer test
on:
push: {branches: main}
pull_request:
workflow_dispatch:
jobs:
consumer-test:
name: Consumer test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm i -g npm@^10.5.1
- name: Remove "prepare" script
run: npm pkg delete scripts.prepare
- name: Install dependencies
run: npm ci
- name: Build @primer/react
run: npm run build -w rollup-plugin-import-css -w @primer/react
# Output the artifact as a tarball in `consumer-test`. Write the
# information for this package in `consumer-test/pack.json` so we can read
# from it later to install the package
- name: Create a tarball for the package
run: npm pack --pack-destination ../../examples/consumer-test --json > ../../examples/consumer-test/pack.json
working-directory: packages/react
- name: Clean package directory
run: npm run clean:all
- name: Test
id: test
working-directory: examples/consumer-test
run: |
# Read the filename for the tarball from `pack.json`
npm install $(jq -r '.[0].filename' pack.json)
npm install
npm run check
- name: Add annotation
if: failure() && steps.test.conclusion == 'failure'
run: |
echo "::error file=tsconfig.build.json::Test package could not build. See https://github.com/primer/react/blob/main/examples/consumer-test"