diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 38ca98d4b..bb880002d 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -4,8 +4,9 @@ on: # Times in UTC (PST+8), this translates to running Mon-Fri at 2am/3am (depending on DST) - cron: 0 10 * * 1-5 # Only enable on pull requests for testing - # pull_request: - # paths: [.github/workflows/nightly.yaml] + # DONOTLAND: REVERT THIS + pull_request: + paths: [.github/workflows/nightly.yaml] workflow_dispatch: {} permissions: @@ -30,6 +31,8 @@ jobs: name: Plugin Tests Main # runs-on: [self-hosted, "${{ matrix.os }}"] TODO(Tyler): Set after Windows self-hosted are established. runs-on: ${{ matrix.os }} + # DONOTLAND: REVERT THIS + if: false timeout-minutes: 120 strategy: fail-fast: false @@ -174,7 +177,9 @@ jobs: uses: ./.github/actions/linter_tests with: linter-version: ${{ matrix.linter-version }} - append-args: linters -- --json --outputFile=${{ matrix.results-file }}-res.json + # DONOTLAND: REVERT THIS + append-args: linters/t -- --json --outputFile=${{ matrix.results-file }}-res.json + # append-args: linters -- --json --outputFile=${{ matrix.results-file }}-res.json ref-type: release sourcery-token: ${{ secrets.TRUNK_SOURCERY_TOKEN }} trunk-staging-token: ${{ secrets.TRUNK_DEBUGGER_TOKEN }} @@ -214,6 +219,8 @@ jobs: tool_tests_main: name: Tool Tests Main # runs-on: [self-hosted, "${{ matrix.os }}"] TODO(Tyler): Set after Windows self-hosted are established. + # DONOTLAND: REVERT THIS + if: false runs-on: ${{ matrix.os }} timeout-minutes: 120 strategy: @@ -253,7 +260,9 @@ jobs: name: Upload Tool Test Results needs: tool_tests_main # Still run on test failure - if: always() + # DONOTLAND: REVERT THIS + # if: always() + if: false uses: ./.github/workflows/upload_results.reusable.yaml secrets: TRUNKBOT_SLACK_BOT_TOKEN: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }} @@ -270,10 +279,14 @@ jobs: # Run repo healthcheck tests repo_tests: name: Repo Tests + # DONOTLAND: REVERT THIS + if: false uses: ./.github/workflows/repo_tests.reusable.yaml action_tests_main: name: Action Tests Main + # DONOTLAND: REVERT THIS + if: false runs-on: [ubuntu-latest] timeout-minutes: 30 steps: diff --git a/.github/workflows/upload_results.reusable.yaml b/.github/workflows/upload_results.reusable.yaml index 0593f737c..404429fc0 100644 --- a/.github/workflows/upload_results.reusable.yaml +++ b/.github/workflows/upload_results.reusable.yaml @@ -103,20 +103,14 @@ jobs: steps.download-ubuntu.outcome == 'failure' || steps.download-macos.outcome == 'failure' || steps.download-windows.outcome == 'failure' with: - channel-id: ${{ env.SLACK_CHANNEL_ID }} payload: | - { - "text": "Artifact Download Failure", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "Failure: " - } - } - ] - } + channel: ${{ env.SLACK_CHANNEL_ID }} + text: "Artifact Download Failure" + blocks: + - type: section + text: + type: mrkdwn + text: "Failure: " env: SLACK_BOT_TOKEN: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }} @@ -139,8 +133,8 @@ jobs: id: parse run: | npm run parse - echo "failures=$([[ -f failures.json ]] && echo "true" || echo "false")" >> "$GITHUB_OUTPUT" - echo "failures-payload=$(cat failures.json)" >> "$GITHUB_OUTPUT" + echo "failures=$([[ -f failures.yaml ]] && echo "true" || echo "false")" >> "$GITHUB_OUTPUT" + echo "failures-payload=$(cat failures.yaml)" >> "$GITHUB_OUTPUT" echo "reruns=$(cat reruns.txt)" >> "$GITHUB_OUTPUT" env: PLUGIN_VERSION: ${{ inputs.plugin-version }} @@ -184,8 +178,9 @@ jobs: uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 if: always() && steps.parse.outputs.failures == 'true' with: - channel-id: ${{ env.SLACK_CHANNEL_ID }} - payload: ${{ steps.parse.outputs.failures-payload }} + payload: | + channel: ${{ env.SLACK_CHANNEL_ID }} + ${{ steps.parse.outputs.failures-payload }} env: SLACK_BOT_TOKEN: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }} @@ -193,20 +188,14 @@ jobs: uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 if: inputs.upload-validated-versions == true && steps.upload-staging.outcome == 'failure' with: - channel-id: ${{ env.SLACK_CHANNEL_ID }} payload: | - { - "text": "Upload Failure", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "Failure: " - } - } - ] - } + channel: ${{ env.SLACK_CHANNEL_ID }} + text: "Upload Failure" + blocks: + - type: section + text: + type: mrkdwn + text: "Failure: " env: SLACK_BOT_TOKEN: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }} @@ -214,20 +203,14 @@ jobs: uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 if: inputs.upload-validated-versions == true && steps.upload-prod.outcome == 'failure' with: - channel-id: ${{ env.SLACK_CHANNEL_ID }} payload: | - { - "text": "Upload Failure", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "Failure: " - } - } - ] - } + channel: ${{ env.SLACK_CHANNEL_ID }} + text: "Upload Failure" + blocks: + - type: section + text: + type: mrkdwn + text: "Failure: " env: SLACK_BOT_TOKEN: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }} generate_snapshots_pr: diff --git a/tests/parse/index.ts b/tests/parse/index.ts index a2fe0b0a1..3aa3a4659 100644 --- a/tests/parse/index.ts +++ b/tests/parse/index.ts @@ -1,5 +1,6 @@ import * as fs from "fs"; import path from "path"; +import YAML from "yaml"; import { FailedVersion, FailureMode, @@ -13,7 +14,7 @@ import { REPO_ROOT } from "tests/utils"; import { getTrunkVersion } from "tests/utils/trunk_config"; const RESULTS_FILE = path.resolve(REPO_ROOT, "results.json"); -const FAILURES_FILE = path.resolve(REPO_ROOT, "failures.json"); +const FAILURES_FILE = path.resolve(REPO_ROOT, "failures.yaml"); const RERUN_FILE = path.resolve(REPO_ROOT, "reruns.txt"); const VALIDATED_LINTER_BLOCKLIST: string[] = []; @@ -302,7 +303,7 @@ const writeFailuresForNotification = (failures: FailedVersion[]) => { text: `${failures.length} failures encountered running plugins tests for ${TEST_REF}`, blocks, }; - const failuresString = JSON.stringify(failuresObject); + const failuresString = YAML.stringify(failuresObject); fs.writeFileSync(FAILURES_FILE, failuresString); console.log(`Wrote ${failures.length} failures out to ${FAILURES_FILE}:`); console.log(failuresString);