Skip to content

Automation to check dependent packages for breakage #4

Automation to check dependent packages for breakage

Automation to check dependent packages for breakage #4

name: Check Dependents
on:
push:
workflow_dispatch:
inputs:
ref:
default: master
description: The branch, tag, or sha to test against
type: string
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ inputs.ref }}
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: npm
- name: Install dependencies
run: npm install
- name: Set version
run: npm run version
- name: Build
run: npm run build
- name: Package
run: |
package=$(npm pack)
mv $package tough-cookie.tgz
- name: Cache artifacts
uses: actions/cache/save@v3
with:
key: ${{ github.run_id }}-tough-cookie
path: tough-cookie.tgz
jsdom:
runs-on: ubuntu-latest
needs: [package]
steps:
- uses: actions/checkout@v3
with:
repository: jsdom/jsdom
submodules: recursive
- name: Restore cached assets
uses: actions/cache/restore@v3
with:
fail-on-cache-miss: true
key: ${{ github.run_id }}-tough-cookie
path: tough-cookie.tgz
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: yarn
- name: Setup HOSTS file for Web Platform Test server
run: ./test/web-platform-tests/tests/wpt make-hosts-file | sudo tee -a /etc/hosts
- name: Install dependencies
run: |
ls
yarn add ./tough-cookie.tgz
yarn install
- name: Run tests
run: yarn test --retries 1