generated from Hexafuchs/ts-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 890 Bytes
/
testing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Original by Spatie as MIT
# https://github.com/spatie/package-skeleton-laravel/blob/main/.github/workflows/run-tests.yml
name: Run Tests
on:
push:
paths:
- '.github/workflows/testing.yml'
- '**.js'
- '**.ts'
- 'package.json'
- 'package-lock.json'
jobs:
testing:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
node: ["20", "22"]
name: ${{ matrix.node }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm ci
- name: Execute tests
run: npm run test
- name: Execute build
run: npm run build