name: Test Patches on: workflow_dispatch: inputs: discord_branch: type: choice description: "Discord Branch to test patches on" options: - both - stable - canary default: both webhook_url: type: string description: "Webhook URL that the report will be posted to. This will be visible for everyone, so DO NOT pass sensitive webhooks like discord webhook. This is meant to be used by Venbot." required: false schedule: # # Every day at midnight - cron: 0 0 * * * env: FORCE_COLOR: true jobs: TestPlugins: name: Test Patches runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 if: ${{ github.event_name == 'schedule' }} with: ref: dev - uses: actions/checkout@v4 if: ${{ github.event_name == 'workflow_dispatch' }} - uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Install dependencies run: | bun install - name: Install Google Chrome id: setup-chrome uses: browser-actions/setup-chrome@82b9ce628cc5595478a9ebadc480958a36457dc2 with: chrome-version: stable - name: Build Equicord Reporter Version run: bun run buildReporter - name: Run Reporter timeout-minutes: 10 run: | export PATH="$PWD/node_modules/.bin:$PATH" export CHROMIUM_BIN=${{ steps.setup-chrome.outputs.chrome-path }} bun build scripts/generateReport.ts --outfile dist/report.mjs --target bun 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 bun run dist/report.mjs > "$stable_output_file" & pids+=" $!" fi if [[ "$branch" = "both" || "$branch" = "canary" ]]; then USE_CANARY=true bun run 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: ${{ inputs.webhook_url || secrets.WEBHOOK_URL }} WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}