-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (60 loc) · 1.56 KB
/
nodejsci.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
60
61
62
63
64
name: CI (typing-app)
on:
push:
branches:
- "ci/**"
- develop
- main
paths:
- .github/workflows/nodejsci.yml
- "typing-app/**"
pull_request:
branches:
- "ci/**"
- develop
- main
paths:
- .github/workflows/nodejsci.yml
- "typing-app/**"
workflow_dispatch:
defaults:
run:
working-directory: ./typing-app
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache
with:
path: |
${{ github.workspace }}/typing-app/node_modules
${{ github.workspace }}/typing-app/.next/cache
key: ${{ runner.os }}-bun-cache-${{ hashFiles('typing-app/bun.lockb') }}
restore-keys: ${{ runner.os }}-bun-cache-
- uses: oven-sh/setup-bun@v1
if: steps.cache.outputs.cache-hit != 'true'
with:
bun-version: latest
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: bun install
- name: Try to build
run: npm run build
lint:
name: Lint
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: |
${{ github.workspace }}/typing-app/node_modules
${{ github.workspace }}/typing-app/.next/cache
key: ${{ runner.os }}-bun-cache-${{ hashFiles('typing-app/bun.lockb') }}
fail-on-cache-miss: true
- name: Run lint
run: npm run lint