Skip to content

Commit

Permalink
Verify that latest published hereby can run local hereby and vice ver…
Browse files Browse the repository at this point in the history
…sa (#133)
  • Loading branch information
jakebailey authored Jul 13, 2024
1 parent 589ee99 commit c2784ce
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
permissions:
contents: read

defaults:
run:
shell: bash

jobs:
test:
strategy:
Expand Down Expand Up @@ -103,13 +107,58 @@ jobs:
- run: npm ci
- run: npx dprint check

check-latest:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

name: Check latest on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: ${{ github.event_name != 'schedule' }}

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '*'
- run: npm ci
- run: npm pack

- run: npm install -g hereby

- run: |
set -exo pipefail
WORKSPACE=$PWD
cd $(mktemp -d)
npm init -y
npm install $WORKSPACE/*.tgz
cp $WORKSPACE/dist/__tests__/cli/__fixtures__/Herebyfile.mjs .
hereby --tasks
name: Verify that latest hereby can run local hereby
- run: |
set -exo pipefail
WORKSPACE=$PWD
cd $(mktemp -d)
npm init -y
npm install hereby
cp $WORKSPACE/dist/__tests__/cli/__fixtures__/Herebyfile.mjs .
node $WORKSPACE/bin/hereby.js --tasks
name: Verify that local hereby can run latest hereby
required:
runs-on: ubuntu-latest
if: ${{ always() }}
needs:
- test
- eslint
- dprint
- check-latest

steps:
- name: Check required jobs
Expand All @@ -118,6 +167,7 @@ jobs:
"${{ needs.test.result }}"
"${{ github.event_name != 'schedule' && needs.eslint.result || 'success' }}"
"${{ github.event_name != 'schedule' && needs.dprint.result || 'success' }}"
"${{ needs.check-latest.result }}"
)
for result in "${results[@]}"; do
Expand Down

0 comments on commit c2784ce

Please sign in to comment.