From 31e78e5f8fff70e1b40bc269d00a6599c307d82c Mon Sep 17 00:00:00 2001 From: Graham Langford Date: Mon, 18 Nov 2024 11:10:43 -0600 Subject: [PATCH] deletes unnecessary workflows --- .github/dependabot.yml | 58 --------- .github/workflows/beta-release.yaml | 111 ----------------- .github/workflows/dependabot-auto-merge.yml | 32 ----- .../e2e-test-pre-release-browsers.yml | 29 ----- .github/workflows/rainforestqa.yml | 116 ------------------ .github/workflows/stale-issue.yml | 24 ---- .github/workflows/upload-mixpanel-lexicon.yml | 32 ----- 7 files changed, 402 deletions(-) delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/beta-release.yaml delete mode 100644 .github/workflows/dependabot-auto-merge.yml delete mode 100644 .github/workflows/e2e-test-pre-release-browsers.yml delete mode 100644 .github/workflows/rainforestqa.yml delete mode 100644 .github/workflows/stale-issue.yml delete mode 100644 .github/workflows/upload-mixpanel-lexicon.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 01d6de5c8e..0000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,58 +0,0 @@ -# Documentation -# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file - -# Updates can also be manually requested by clicking "Last checked 3 days ago" on the page -# https://github.com/pixiebrix/pixiebrix-extension/network/updates - -version: 2 -updates: - - package-ecosystem: npm - # Dependabot doesn't support having a different configuration for each npm workspace - # https://github.com/dependabot/dependabot-core/issues/6346#issuecomment-1580691400 - directory: / - schedule: - interval: weekly - day: sunday - time: "08:42" - timezone: Etc/UTC - versioning-strategy: increase # Update package.json too https://stackoverflow.com/a/66819358/288906 - open-pull-requests-limit: 30 - assignees: - - grahamlangford - groups: - patch: - patterns: - - "*" - update-types: - - patch - rjsf: - patterns: - - "@rjsf/*" - # Until https://github.com/pixiebrix/pixiebrix-extension/issues/7915 - # storybook: - # patterns: - # - "*storybook*" - fontawesome: - patterns: - - "@fortawesome/*" - datadog: - patterns: - - "@datadog/*" - object-hash: - patterns: - - "object-hash" - - "@types/object-hash" - - ignore: - # Until https://github.com/pixiebrix/pixiebrix-extension/issues/7915 - - dependency-name: "*storybook*" - - package-ecosystem: github-actions - directory: / - schedule: - interval: weekly - day: sunday - time: "08:42" - timezone: Etc/UTC - open-pull-requests-limit: 30 - assignees: - - grahamlangford diff --git a/.github/workflows/beta-release.yaml b/.github/workflows/beta-release.yaml deleted file mode 100644 index 4263746059..0000000000 --- a/.github/workflows/beta-release.yaml +++ /dev/null @@ -1,111 +0,0 @@ -name: Upload and Publish Beta Listing - -on: - workflow_dispatch: - inputs: - # This is the version that will trigger the workflow - version: - description: "Version to publish. For example, '1.0.0' or '2.0.0-beta.1'" - required: true - skip_tests: - description: "Skip the end-to-end tests" - required: true - default: false - -env: - # Creates and uploads sourcemaps to Application error telemetry, and save the built extension as an artifact - PUBLIC_RELEASE: true - CHROME_MANIFEST_KEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs9/BXaFQsYPDxqbVvi11xhWdxfygfrF5YCLiboJooQyTkqIGpGxtI3JF/hkAXDcoqI+N5ATsGPYW34CdOc7uBCU91Ig+gHFiicnkzJaoOBjIwqx452l2/mp7cqNdavtCq40YENkF13ouj5loPwMMYY0L/sSvab+6eO20i1+Ulbsn9onS/fDd16clOaIbUVJ1PhyYvrU0HGVUqW5wUIDLyRezr3aTQLtDIQp/7DTBQ60S2G5KPpAW1UEphnXRLwl6cR5MiYw20OStfTZaA2qpWQvLAQtBoPNjP0Ld6rzI/e3uaC5qUMMCusitKeCA5HOFQDz2IJ0kS8Cn5fxzhXFi6QIDAQAB - MV: 3 - RELEASE_CHANNEL: beta - DATADOG_APPLICATION_ID: ${{ secrets.DATADOG_APPLICATION_ID }} - DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }} - -jobs: - build: - runs-on: ubuntu-latest - - env: - SOURCE_MAP_URL_BASE: https://pixiebrix-extension-source-maps.s3.amazonaws.com - SOURCE_MAP_PATH: sourcemaps/${{ github.job }}/${{ github.sha }}/mv3 - - # Docs https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations - strategy: - fail-fast: false - - name: build-beta - steps: - - uses: actions/checkout@v4 - with: - ref: release/${{ github.event.inputs.version }} - - uses: actions/setup-node@v4 - with: - node-version-file: applications/browser-extension/package.json - cache: npm - - run: npm ci - - run: npm run build - - run: bash applications/browser-extension/scripts/upload-sourcemaps.sh - env: - AWS_ACCESS_KEY_ID: ${{ secrets.SOURCEMAP_USER_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.SOURCEMAP_USER_KEY }} - AWS_DEFAULT_REGION: "us-east-2" - DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} - - name: Delete local sourcemaps - run: find applications/browser-extension/dist -name '*.map' -delete - - name: Save store extension - uses: actions/upload-artifact@v4 - with: - name: build-for-store-beta - path: applications/browser-extension/dist - retention-days: 30 - if-no-files-found: error - - name: Create production version - run: npx dot-json@1.3.0 applications/browser-extension/dist/manifest.json key '${{ env.CHROME_MANIFEST_KEY }}' - - name: Save production extension - uses: actions/upload-artifact@v4 - with: - name: build-production-beta - path: applications/browser-extension/dist - retention-days: 30 - if-no-files-found: error - - end-to-end-tests: - name: end-to-end-tests - uses: ./.github/workflows/end-to-end-tests.yml - secrets: inherit - with: - checkout-ref: release/${{ github.event.inputs.version }} - if: ${{ github.event.inputs.skip_tests != 'true' }} - - publish: - # https://github.com/fregante/chrome-webstore-upload-keys - needs: - - build - - end-to-end-tests - # https://stackoverflow.com/a/69354134 - if: | - always() && - needs.build.result == 'success' && - (needs.end-to-end-tests.result == 'success' || needs.end-to-end-tests.result == 'skipped') - runs-on: ubuntu-latest - steps: - - uses: actions/download-artifact@v4 - with: - name: build-for-store-beta - - name: Upload to Chrome Web Store (automatically publishes) - run: npx chrome-webstore-upload-cli@3 upload --auto-publish - env: - EXTENSION_ID: mpapkmgkphbggmlekkfnoilmafnbfile - CLIENT_ID: ${{ secrets.WEBSTORE_UPLOAD_CLIENT_ID }} - CLIENT_SECRET: ${{ secrets.WEBSTORE_UPLOAD_CLIENT_SECRET }} - REFRESH_TOKEN: ${{ secrets.WEBSTORE_UPLOAD_REFRESH_TOKEN }} - notify: - needs: build - runs-on: ubuntu-latest - steps: - - name: Slack Notification - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: release-notifications - SLACK_MESSAGE: "Chrome beta publish succeeded :rocket:" diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml deleted file mode 100644 index 1995906af7..0000000000 --- a/.github/workflows/dependabot-auto-merge.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Dependabot auto-approve -on: - pull_request: - paths: - - package-lock.json - -permissions: - contents: write - pull-requests: write - -jobs: - dependabot: - runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' - steps: - - name: Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@v2 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Approve a PR - if: steps.metadata.outputs.update-type == 'version-update:semver-patch' - run: gh pr review --approve "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: Enable auto-merge for Dependabot PRs - if: steps.metadata.outputs.update-type == 'version-update:semver-patch' - run: gh pr merge --auto --squash "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/e2e-test-pre-release-browsers.yml b/.github/workflows/e2e-test-pre-release-browsers.yml deleted file mode 100644 index abd999c4b2..0000000000 --- a/.github/workflows/e2e-test-pre-release-browsers.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Pre-release Browsers - -on: - schedule: - # Run nightly at 1:00 AM EST (5:00 UTC) - - cron: "0 5 * * *" - workflow_dispatch: - -jobs: - end-to-end-tests: - name: end-to-end-tests - uses: ./.github/workflows/end-to-end-tests.yml - secrets: inherit - with: - # Include stable browsers for comparison - projects: '["chrome-beta", "msedge-beta", "chromium", "chrome", "msedge"]' - - slack-notification: - needs: end-to-end-tests - runs-on: ubuntu-latest - if: ${{ always() && (needs.end-to-end-tests.result == 'failure') }} - steps: - - name: Slack Notification - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: playwright-playground - SLACK_MESSAGE: "Nightly pre-release browser tests failed" - SLACK_COLOR: ${{ job.status }} diff --git a/.github/workflows/rainforestqa.yml b/.github/workflows/rainforestqa.yml deleted file mode 100644 index 307b5bfde4..0000000000 --- a/.github/workflows/rainforestqa.yml +++ /dev/null @@ -1,116 +0,0 @@ -name: Rainforest QA Run - -# There's only one Rainforest server, so this workflow must wait for the previous run to end. -# The queue length is 1, so with multiple PRs merged at once, this workflow will only be run twice in total. -# See https://github.com/pixiebrix/pixiebrix-extension/pull/7562#discussion_r1485159972 -concurrency: - group: one-rainforest-server - -# For now, we'll manually trigger the run. We might consider the pull_request review_requested or push to main -# event triggers in the future. These will require potentially cleanly dealing with concurrent runs -# https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows -# https://frontside.com/blog/2020-05-26-github-actions-pull_request/ -on: - workflow_dispatch: - push: - branches: - - main - - release/** - schedule: - - cron: "0 8 * * *" # 8am UTC -> 3am EST - -jobs: - rainforestqa: - runs-on: ubuntu-latest - env: - RAINFOREST_RUN_GROUP_MAIN: 14129 - RAINFOREST_RUN_GROUP_RELEASE: 14130 - RAINFOREST_RUN_GROUP_CWS: 14131 - # The following environment variables are set so sourceMapPublicUrl, and there SOURCE_MAP_PUBLIC_PATH, is defined in the build - PUBLIC_RELEASE: true - SOURCE_MAP_URL_BASE: https://pixiebrix-extension-source-maps.s3.amazonaws.com - SOURCE_MAP_PATH: sourcemaps/build/${{ github.sha }}/mv3 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: applications/browser-extension/package.json - cache: npm - - - run: npm ci - - run: npm run build - env: - MV: 3 - DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }} - DATADOG_APPLICATION_ID: ${{ secrets.DATADOG_APPLICATION_ID }} - CHROME_MANIFEST_KEY: ${{ secrets.CHROME_MANIFEST_PROD_PUBLIC_KEY }} - - # https://stackoverflow.com/a/58142637 - # GitHub doesn't support if-else, so we need separate steps - - name: Determine if main branch - run: | - echo "BUILD_PATH=builds/pixiebrix-extension-main.zip" >> $GITHUB_ENV - echo "RUN_GROUP=$RAINFOREST_RUN_GROUP_MAIN" >> $GITHUB_ENV - if: github.ref_name == 'main' - - name: Determine if release branch - run: | - echo "BUILD_PATH=builds/pixiebrix-extension-release.zip" >> $GITHUB_ENV - echo "RUN_GROUP=$RAINFOREST_RUN_GROUP_RELEASE" >> $GITHUB_ENV - if: startsWith(github.ref_name, 'release/') - - name: Determine if CWS release branch - # shell script used because GitHub actions doesn't support regex in if statements - # will overwrite the previous step correctly if it's a CWS-release branch - run: | - if [[ $ref_name =~ ^release\/[0-9]+.[0-9]+.[0-9]+$ ]]; then - echo "BUILD_PATH=builds/pixiebrix-extension-cws.zip" >> $GITHUB_ENV - echo "RUN_GROUP=$RAINFOREST_RUN_GROUP_CWS" >> $GITHUB_ENV - fi - env: - ref_name: ${{ github.ref_name }} - - - name: Upload Extension - run: bash applications/browser-extension/scripts/upload-extension.sh ${{ env.BUILD_PATH }} - env: - AWS_ACCESS_KEY_ID: ${{ secrets.SOURCEMAP_USER_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.SOURCEMAP_USER_KEY }} - AWS_DEFAULT_REGION: "us-east-2" - - - name: Reset Test Account Data - run: | - curl -H "Authorization: Token $TOKEN" -X POST https://app.pixiebrix.com/api/tests/seed/rainforest/ - env: - TOKEN: ${{ secrets.TEST_ACCOUNT_KEY }} - - - name: Install Rainforest QA CLI - run: | - curl -sL $(curl -s https://api.github.com/repos/rainforestapp/rainforest-cli/releases/latest | jq -r '.assets[].browser_download_url | select(test("linux-amd64.tar.gz"))') | tar zxf - rainforest - - # https://github.com/rainforestapp/rainforest-cli - - name: Run Rainforest QA Extension Test Suite - # Can't pass cancel for conflict because while we're generating a separate Rainforest QA environment for each run - # they're all using the same server - # Use --fail-fast so that we're not using GitHub build minutes if not necessary - run: | - ./rainforest run \ - --fail-fast \ - --automation-max-retries 1 \ - --description "pixiebrix-extension - ${{ github.ref_name }} ${{ github.job }}" \ - --run-group $RUN_GROUP \ - --release "${{ github.sha }}" \ - --conflict cancel-all - env: - RAINFOREST_API_TOKEN: ${{ secrets.RAINFORESTQA_TOKEN }} - # The run group for tests to run during CI, now has start URL built-in - RUN_GROUP: ${{ env.RUN_GROUP }} - - - name: Slack Notification - if: failure() - uses: rtCamp/action-slack-notify@v2 - with: - status: ${{ job.status }} - notify_when: "failure" - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: rainforest-notifications - SLACK_MESSAGE: "Rainforest run failed" - SLACK_COLOR: ${{ job.status }} diff --git a/.github/workflows/stale-issue.yml b/.github/workflows/stale-issue.yml deleted file mode 100644 index 934fc48a09..0000000000 --- a/.github/workflows/stale-issue.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: "Close stale issues and PRs" -on: - workflow_dispatch: - schedule: - - cron: "0 0 * * *" # every day at midnight - -permissions: - issues: write - pull-requests: write - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v9 - with: - stale-issue-message: "This issue will be closed in 7 days unless the stale label is removed, or a comment is added to the issue." - stale-pr-message: "This PR will be closed in 7 days unless the stale label is removed, or a comment is added to the PR." - close-issue-message: "This issue was closed because it has been stale for 7 days with no activity." - close-pr-message: "This PR was closed because it has been stale for 7 days with no activity." - days-before-issue-stale: 90 - days-before-pr-stale: 30 - # GitHub API rate limits number of operations daily, but we can afford to run more than the default 30 times per day - operations-per-run: 100 diff --git a/.github/workflows/upload-mixpanel-lexicon.yml b/.github/workflows/upload-mixpanel-lexicon.yml deleted file mode 100644 index 5eef6f2ceb..0000000000 --- a/.github/workflows/upload-mixpanel-lexicon.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Upload Mixpanel Lexicon - -on: - push: - branches: [main] - pull_request: - branches: [main] - workflow_dispatch: - -jobs: - upload-lexicon: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: applications/browser-extension/package.json - cache: npm - - name: Install dependencies - run: npm ci - - name: Compile TypeScript - # Explicitly specify the TypeScript environment because tsconfig.json is ignored when input files are specified - # Provide `--yes` for knip. Even though tsc will be available via typescript, knip doesn't associate it with - # the tsc command - run: npx --yes tsc applications/browser-extension/scripts/uploadMixpanelLexicon.ts --esModuleInterop --lib esnext - - name: Upload Lexicon - if: github.ref_name == 'main' - run: node applications/browser-extension/scripts/uploadMixpanelLexicon.js - env: - MIXPANEL_PROJECT_ID: ${{ secrets.MIXPANEL_PROJECT_ID }} - MIXPANEL_SERVICE_ACCOUNT_USERNAME: ${{ secrets.MIXPANEL_SERVICE_ACCOUNT_USERNAME }} - MIXPANEL_SERVICE_ACCOUNT_SECRET: ${{ secrets.MIXPANEL_SERVICE_ACCOUNT_SECRET }}