Skip to content

Commit

Permalink
let setup-node handle caching
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenmathieson committed Jul 7, 2023
1 parent c78acd6 commit 7ab4558
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: node_modules
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: npm run eslint

Expand All @@ -24,13 +21,10 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: node_modules
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: npm run build
- uses: actions/cache/save@v3
Expand All @@ -46,17 +40,14 @@ jobs:
browser: [Chrome, Firefox]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: node_modules
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- uses: actions/cache/restore@v3
with:
path: axe.js
key: axe-build-${{ github.sha }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: xvfb-run --auto-servernum npm run test -- --browsers ${{ matrix.browser }}

Expand All @@ -68,17 +59,14 @@ jobs:
browser: [chrome, firefox]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: node_modules
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- uses: actions/cache/restore@v3
with:
path: axe.js
key: axe-build-${{ github.sha }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: npx browser-driver-manager install chromedriver --verbose
- run: xvfb-run --auto-servernum npm run test:integration:${{ matrix.browser }}

0 comments on commit 7ab4558

Please sign in to comment.