-
-
Notifications
You must be signed in to change notification settings - Fork 128
59 lines (50 loc) · 1.44 KB
/
test.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Test
on:
push:
branches:
- master
# - development
pull_request:
branches:
- master
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest] # windows-latest]
node: ['18', '20']
runs-on: ${{ matrix.platform }}
steps:
- name: Github Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Setup bun
uses: oven-sh/setup-bun@v1
- name: Setup nextjs cache
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
${{ github.workspace }}/**/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-
- name: Install
run: bun install --immutable --force
- name: Lint
run: bun run lint
- name: Test
run: bun run test
env:
CI: true
NEXT_TELEMETRY_DISABLED: 1
- name: Build
run: bun run build
env:
NEXT_TELEMETRY_DISABLED: 1