Skip to content

Add tests for pear seed #1933

Add tests for pear seed

Add tests for pear seed #1933

Workflow file for this run

name: Build Status
on:
schedule:
- cron: '0 10 * * *'
push:
branches:
- main
- next
pull_request:
repository_dispatch:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux
arch: x64
- os: macos-latest
platform: darwin
arch: x64
- os: windows-latest
platform: win32
arch: x64
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 https://github.com/actions/checkout/releases/tag/v4.1.1
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.ref }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 https://github.com/actions/setup-node/releases/tag/v4.0.2
with:
node-version: lts/*
- name: Determine Local Pear Command per OS
run: echo "PEAR=$( [[ \"$RUNNER_OS\" == \"Windows\" ]] && echo 'pwsh -File ./pear.ps1' || echo './pear.dev' )" >> $GITHUB_ENV
shell: bash
- name: Install w/ dev deps
run: npm install
- name: Bootstrap
run: npm run bootstrap
- name: Remove node_modules
run: rm -fr node_modules
shell: bash
- name: Install w/out dev deps
run: npm i --omit=dev
- name: Self-Stage
run: $PEAR stage ci
shell: bash
- name: Artifact Pear
run: $PEAR dump $($PEAR info ci --key) $(node -p "fs.realpathSync(os.tmpdir())")/artifact-pear
shell: bash
- name: Shutdown Local Pear Sidecar
run: $PEAR sidecar shutdown
shell: bash
- name: Remove node_modules
run: rm -fr node_modules
shell: bash
- name: Install w/ dev deps
run: npm install
- name: Install fixture deps
run: |
cd ./test/fixtures/harness
npm install
cd -
cd ./test/fixtures/encrypted
npm install
cd -
shell: bash
- name: Test
if: runner.os != 'Windows'
run: $PEAR run -t test
- name: Test (Win)
if: runner.os == 'Windows'
run: ./pear.ps1 run -t test
- name: Shutdown Local Pear Sidecar
run: $PEAR sidecar shutdown
shell: bash
- name: Lint
run: npm run lint