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