2024-08-04 00:34:28 -04:00
|
|
|
name: Test
|
2022-10-05 18:42:58 -04:00
|
|
|
on:
|
2024-11-01 01:02:07 -04:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- dev
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- dev
|
2024-04-17 14:29:47 -04:00
|
|
|
|
2022-10-05 18:42:58 -04:00
|
|
|
jobs:
|
2024-11-01 01:02:07 -04:00
|
|
|
Test:
|
|
|
|
name: Test For Pushes
|
|
|
|
if: ${{ github.event_name == 'push' }}
|
|
|
|
runs-on: ubuntu-latest
|
2024-04-17 14:29:47 -04:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
|
2024-04-17 14:29:47 -04:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
- name: Use Node.js 20
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: 20
|
|
|
|
cache: "pnpm"
|
2024-04-17 14:29:47 -04:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install --frozen-lockfile
|
2024-04-17 14:29:47 -04:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
- name: Lint & Test if desktop version compiles
|
|
|
|
run: pnpm test
|
2024-04-17 14:29:47 -04:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
- name: Test if web version compiles
|
|
|
|
run: pnpm buildWeb
|
2024-04-17 14:29:47 -04:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
- name: Test if plugin structure is valid
|
|
|
|
run: pnpm generatePluginJson
|
2024-04-17 14:29:47 -04:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
TestForPRs:
|
|
|
|
name: Test For Pull Requests
|
|
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
|
|
runs-on: ubuntu-latest
|
2022-10-05 18:42:58 -04:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
|
2022-10-09 16:31:51 -04:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
- name: Use Node.js 20
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: 20
|
|
|
|
cache: "pnpm"
|
2022-10-09 16:31:51 -04:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install --frozen-lockfile
|
2022-10-09 16:31:51 -04:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
- name: Lint & Test if desktop version compiles
|
|
|
|
run: pnpm test
|
2022-11-25 17:51:36 -05:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
- name: Test if web version compiles
|
|
|
|
run: pnpm buildWeb
|
2023-05-11 21:41:00 -04:00
|
|
|
|
2024-11-01 01:02:07 -04:00
|
|
|
- name: Test if plugin structure is valid
|
|
|
|
run: pnpm generatePluginJson
|