Skip to content

husky v9

husky v9 #1500

name: Published simulation
on:
push:
branches:
- main
pull_request:
jobs:
simulate-publishing:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
cache: npm
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Cache nextjs build
uses: actions/cache@v4
with:
path: .next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
restore-keys: |
${{ runner.os }}-nextjs-
- name: Build
run: npm run build
- name: Package
run: npm pack
- name: Extract and run from tarball
env:
# It's usually the default for `serve` but good to be explicit
PORT: 3000
run: |
set -ex
TARBALL=`ls docsql-*.tgz`
echo $TARBALL
TEMP_DIR=`mktemp -d`
tar -xf $TARBALL --directory $TEMP_DIR
cd $TEMP_DIR/package
npm install
npx . $GITHUB_WORKSPACE/example-directories > /tmp/stdout.log 2> /tmp/stderr.log &
- name: Check that the server started
run: curl --retry-connrefused --retry 4 -I http://localhost:3000/
- name: Debug any server outputs
if: failure()
run: |
echo "____STDOUT____"
cat /tmp/stdout.log
echo "____STDERR____"
cat /tmp/stderr.log