Skip to content

Enhancement: add github actions caching option #3408

Enhancement: add github actions caching option

Enhancement: add github actions caching option #3408

Workflow file for this run

name: Run e2e tests
on:
pull_request:
types:
- opened
- reopened
- synchronize # canary on new commit
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all tags for ship-it
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: |
~/.npm
**/node_modules
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/lerna.json') }}
restore-keys: |
${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}-
${{ runner.os }}-build-
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm install
- name: Install Puppeteer Browsers
run: |
npx puppeteer install --browser chrome
- name: Run tests
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
# Increase the Jest timeout
echo "module.exports = { testTimeout: 30000 };" > jest.config.js
npm run test