2022-11-11 13:37:37 +02:00
|
|
|
name: Test Patches
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
2023-06-01 23:49:15 +03:00
|
|
|
# Every day at midnight
|
|
|
|
- cron: 0 0 * * *
|
2022-11-11 13:37:37 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
TestPlugins:
|
2023-06-09 22:48:18 +03:00
|
|
|
if: github.repository == 'Vendicated/Vencord'
|
2022-11-11 13:37:37 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2024-05-04 00:47:15 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-11-25 02:56:29 +02:00
|
|
|
if: ${{ github.event_name == 'schedule' }}
|
|
|
|
with:
|
|
|
|
ref: dev
|
|
|
|
|
2024-05-04 00:47:15 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-11-25 02:56:29 +02:00
|
|
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
2022-11-11 13:37:37 +02:00
|
|
|
|
2024-05-04 00:47:15 +03:00
|
|
|
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
|
2022-11-11 13:37:37 +02:00
|
|
|
|
2024-05-07 05:54:25 +03:00
|
|
|
- name: Use Node.js 20
|
2024-05-04 00:47:15 +03:00
|
|
|
uses: actions/setup-node@v4
|
2022-11-11 13:37:37 +02:00
|
|
|
with:
|
2024-05-07 05:54:25 +03:00
|
|
|
node-version: 20
|
2022-11-11 13:37:37 +02:00
|
|
|
cache: "pnpm"
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-06-01 23:49:15 +03:00
|
|
|
pnpm install --frozen-lockfile
|
2022-11-11 13:37:37 +02:00
|
|
|
|
2024-05-04 00:47:15 +03:00
|
|
|
- name: Install Google Chrome
|
|
|
|
id: setup-chrome
|
|
|
|
uses: browser-actions/setup-chrome@82b9ce628cc5595478a9ebadc480958a36457dc2
|
|
|
|
with:
|
2024-05-07 05:54:25 +03:00
|
|
|
chrome-version: stable
|
2022-11-11 14:06:04 +02:00
|
|
|
|
2024-05-29 12:45:44 +03:00
|
|
|
- name: Build Vencord Reporter Version
|
|
|
|
run: pnpm buildReporter
|
2022-11-11 13:37:37 +02:00
|
|
|
|
|
|
|
- name: Create Report
|
2022-11-11 14:06:04 +02:00
|
|
|
timeout-minutes: 10
|
2022-11-11 13:37:37 +02:00
|
|
|
run: |
|
2023-06-01 23:49:15 +03:00
|
|
|
export PATH="$PWD/node_modules/.bin:$PATH"
|
2024-05-04 00:47:15 +03:00
|
|
|
export CHROMIUM_BIN=${{ steps.setup-chrome.outputs.chrome-path }}
|
2022-11-11 14:06:04 +02:00
|
|
|
|
2023-06-01 23:49:15 +03:00
|
|
|
esbuild scripts/generateReport.ts > dist/report.mjs
|
|
|
|
node dist/report.mjs >> $GITHUB_STEP_SUMMARY
|
2022-11-11 13:37:37 +02:00
|
|
|
env:
|
2023-06-01 23:49:15 +03:00
|
|
|
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
|
|
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
2022-12-20 03:59:16 +02:00
|
|
|
|
|
|
|
- name: Create Report (Canary)
|
|
|
|
timeout-minutes: 10
|
|
|
|
if: success() || failure() # even run if previous one failed
|
|
|
|
run: |
|
2023-06-01 23:49:15 +03:00
|
|
|
export PATH="$PWD/node_modules/.bin:$PATH"
|
2024-05-04 00:47:15 +03:00
|
|
|
export CHROMIUM_BIN=${{ steps.setup-chrome.outputs.chrome-path }}
|
2023-06-01 23:49:15 +03:00
|
|
|
export USE_CANARY=true
|
2022-12-20 03:59:16 +02:00
|
|
|
|
2023-06-01 23:49:15 +03:00
|
|
|
esbuild scripts/generateReport.ts > dist/report.mjs
|
|
|
|
node dist/report.mjs >> $GITHUB_STEP_SUMMARY
|
2022-12-20 03:59:16 +02:00
|
|
|
env:
|
2023-06-01 23:49:15 +03:00
|
|
|
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
|
|
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|