Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
79 lines
1.1 KiB
YAML
79 lines
1.1 KiB
YAML
name: Electron
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: electron
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- &checkout
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- &setup-node
|
|
name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: "npm"
|
|
cache-dependency-path: |
|
|
electron/package-lock.json
|
|
|
|
- &install
|
|
name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Compile
|
|
run: tsc
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
|
|
steps:
|
|
- *checkout
|
|
- *setup-node
|
|
- *install
|
|
|
|
- name: Test
|
|
run: npm run test
|
|
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- *checkout
|
|
- *setup-node
|
|
- *install
|
|
|
|
- name: Format
|
|
run: npm run format
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- *checkout
|
|
- *setup-node
|
|
- *install
|
|
|
|
- name: Lint
|
|
run: npm run lint
|