name: Test Patches on: workflow_dispatch: inputs: discord_branch: type: choice description: "Discord Branch to test patches on" options: - both - stable - canary default: both schedule: # # Every day at midnight - cron: 0 0 * * * jobs: TestPlugins: name: Test Patches runs-on: self-hosted steps: - uses: actions/checkout@v4 if: ${{ github.event_name == 'schedule' }} with: ref: dev - uses: actions/checkout@v4 if: ${{ github.event_name == 'workflow_dispatch' }} - 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 --no-frozen-lockfile sudo apt update sudo apt-get install ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils -y - name: Install Google Chrome id: setup-chrome uses: browser-actions/setup-chrome@82b9ce628cc5595478a9ebadc480958a36457dc2 with: chrome-version: stable - name: Build Equicord Reporter Version run: pnpm buildReporter - name: Run Reporter timeout-minutes: 10 run: | export PATH="$PWD/node_modules/.bin:$PATH" export CHROMIUM_BIN=${{ steps.setup-chrome.outputs.chrome-path }} esbuild scripts/generateReport.ts > dist/report.mjs stable_output_file=$(mktemp) canary_output_file=$(mktemp) pids="" branch="${{ inputs.discord_branch }}" if [[ "${{ github.event_name }}" = "schedule" ]]; then branch="both" fi if [[ "$branch" = "both" || "$branch" = "stable" ]]; then node dist/report.mjs > "$stable_output_file" & pids+=" $!" fi if [[ "$branch" = "both" || "$branch" = "canary" ]]; then USE_CANARY=true node dist/report.mjs > "$canary_output_file" & pids+=" $!" fi exit_code=0 for pid in $pids; do if ! wait "$pid"; then exit_code=1 fi done cat "$stable_output_file" "$canary_output_file" >> $GITHUB_STEP_SUMMARY exit $exit_code env: WEBHOOK_URL: ${{ secrets.WEBHOOK }} WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}