Equicord/.github/workflows/test.yml

66 lines
1.5 KiB
YAML
Raw Normal View History

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