Skip to content

Commit

Permalink
ci: setup pnpm before running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jul 8, 2023
1 parent 7a736aa commit 89ca51a
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- pull_request
jobs:
test:
uses: adonisjs/.github/.github/workflows/test.yml@main
uses: adonisjs/core/.github/workflows/test.yml@next

lint:
uses: adonisjs/.github/.github/workflows/lint.yml@main
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
on:
workflow_call:
inputs:
disable-windows:
description: Disable running tests on Windows
type: boolean
default: false
required: false
inputs:
install-pnpm:
description: Install pnpm before running tests
type: boolean
default: false
required: false

jobs:
test_linux:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.16.0, 20.x]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
if: ${{ inputs.install-pnpm }}
uses: pnpm/action-setup@v2
with:
version: 8.6.3

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

test_windows:
if: ${{ !inputs.disable-windows }}
runs-on: windows-latest
strategy:
matrix:
node-version: [18.16.0, 20.x]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
if: ${{ inputs.install-pnpm }}
uses: pnpm/action-setup@v2
with:
version: 8.6.3

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

0 comments on commit 89ca51a

Please sign in to comment.