-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (30 loc) · 1 KB
/
Copy pathci.yml
File metadata and controls
40 lines (30 loc) · 1 KB
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
# .github/workflows/ci.yml
name: Node.js CI & Build
on:
push:
branches: [ "main", "develop" ] # Or your primary branches
pull_request:
branches: [ "main", "develop" ]
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest # Using Ubuntu as a common CI runner
strategy:
matrix:
node-version: [18.x] # Specify Node.js versions to test against
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm" # Enable caching for npm dependencies
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: TypeScript compile check
run: npm run build:electron:main && npm run build:electron:preload && npx tsc --project src/renderer/tsconfig.json --noEmit
- name: Build application
run: npm run build