Skip to content

Fix client project test #45

Fix client project test

Fix client project test #45

Workflow file for this run

on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
use-in-a-client-project:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- name: Pack our shareable config
run: |
mkdir ${{ runner.temp }}/packed
npm pack --pack-destination ${{ runner.temp }}/packed
- name: Create a client project
working-directory: ${{ runner.temp }}
run: |
mkdir some-project
cd some-project
npm init -y
touch index.js
- name: Install our config in the client project
working-directory: ${{ runner.temp }}/some-project
run: |
npm install --save-dev ../packed/*.tgz
- name: Use shareable config (also checks peer dependencies, not including eslint)
working-directory: ${{ runner.temp }}/some-project
run: |
echo '{ "extends": "pa11y" }' > .eslintrc.json
npx eslint@8 .