Skip to content

Commit

Permalink
ci: add bun to test pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Oct 28, 2023
1 parent 079936d commit 9dbec05
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on: [push, pull_request]
jobs:
test_push:
name: Test on push
needs: init
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-22.04
steps:
Expand All @@ -15,17 +14,37 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Deps
run: npm i

- name: Run Node.js tests
run: npm run test

test_pr:
test_pr_bun:
if: ${{ github.event_name == 'pull_request' }}
name: Test PR (Node v${{ matrix.node-version }}, OS ${{ matrix.os }})
runs-on: ubuntu-22.04
name: Test PR with Bun
steps:
- name: Checkout
uses: actions/checkout@v3.1.0

- name: Setup Bun
uses: antongolub/action-setup-bun@v1

- name: Deps
run: |
bun install
ln -s ../ ./node_modules/npm-registry-firewall
- name: Run tests
timeout-minutes: 2
run: bun test:bun

test_pr_node:
if: ${{ github.event_name == 'pull_request' }}
name: Test PR Node.js v${{ matrix.node-version }}, OS ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022 ]
Expand All @@ -48,7 +67,7 @@ jobs:
- if: matrix.os == 'windows-2022' && matrix.node-version == 14
run: npm i -g npm@7

- if: matrix.os == 'windows-2022'
- if: matrix.os == 'windows-2022' && matrix.node-version != 14
run: npm i -g npm@latest

- name: Run tests
Expand All @@ -70,7 +89,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Deps
run: npm i
Expand Down

0 comments on commit 9dbec05

Please sign in to comment.