2022-11-11 12:37:37 +01:00
|
|
|
name: Test Patches
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
2023-06-01 22:49:15 +02:00
|
|
|
# Every day at midnight
|
|
|
|
- cron: 0 0 * * *
|
2022-11-11 12:37:37 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
TestPlugins:
|
2023-06-09 19:48:18 +00:00
|
|
|
if: github.repository == 'Vendicated/Vencord'
|
2022-11-11 12:37:37 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json
|
|
|
|
|
|
|
|
- name: Use Node.js 19
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 19
|
|
|
|
cache: "pnpm"
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-06-01 22:49:15 +02:00
|
|
|
pnpm install --frozen-lockfile
|
|
|
|
pnpm add puppeteer
|
2022-11-11 12:37:37 +01:00
|
|
|
|
2023-06-01 22:49:15 +02:00
|
|
|
sudo apt-get install -y chromium-browser
|
2022-11-11 13:06:04 +01:00
|
|
|
|
2022-11-11 12:37:37 +01:00
|
|
|
- name: Build web
|
|
|
|
run: pnpm buildWeb --standalone
|
|
|
|
|
|
|
|
- name: Create Report
|
2022-11-11 13:06:04 +01:00
|
|
|
timeout-minutes: 10
|
2022-11-11 12:37:37 +01:00
|
|
|
run: |
|
2023-06-01 22:49:15 +02:00
|
|
|
export PATH="$PWD/node_modules/.bin:$PATH"
|
|
|
|
export CHROMIUM_BIN=$(which chromium-browser)
|
2022-11-11 13:06:04 +01:00
|
|
|
|
2023-06-01 22:49:15 +02:00
|
|
|
esbuild scripts/generateReport.ts > dist/report.mjs
|
|
|
|
node dist/report.mjs >> $GITHUB_STEP_SUMMARY
|
2022-11-11 12:37:37 +01:00
|
|
|
env:
|
2023-06-01 22:49:15 +02:00
|
|
|
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
|
|
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
2022-12-20 02:59:16 +01:00
|
|
|
|
|
|
|
- name: Create Report (Canary)
|
|
|
|
timeout-minutes: 10
|
|
|
|
if: success() || failure() # even run if previous one failed
|
|
|
|
run: |
|
2023-06-01 22:49:15 +02:00
|
|
|
export PATH="$PWD/node_modules/.bin:$PATH"
|
|
|
|
export CHROMIUM_BIN=$(which chromium-browser)
|
|
|
|
export USE_CANARY=true
|
2022-12-20 02:59:16 +01:00
|
|
|
|
2023-06-01 22:49:15 +02:00
|
|
|
esbuild scripts/generateReport.ts > dist/report.mjs
|
|
|
|
node dist/report.mjs >> $GITHUB_STEP_SUMMARY
|
2022-12-20 02:59:16 +01:00
|
|
|
env:
|
2023-06-01 22:49:15 +02:00
|
|
|
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
|
|
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|