Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/bunTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
Comment thread
blimpich marked this conversation as resolved.
Resolved
paths:
- 'server/**'
- 'src/**'
Expand All @@ -30,6 +30,7 @@ concurrency:
jobs:
test:
name: Bun tests
if: ${{ github.event_name != 'pull_request' || github.actor != 'os-botify[bot]' }}
runs-on: blacksmith-8vcpu-ubuntu-2404
steps:
- name: Checkout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check Contributor+ checklist heading
on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths:
- 'contributingGuides/CONTRIBUTOR_PLUS_CHECKLIST.md'
- 'scripts/checkContributorPlusChecklistHeading.sh'
Expand All @@ -19,6 +19,7 @@ concurrency:
jobs:
check:
name: Check Contributor+ checklist heading
if: github.actor != 'os-botify[bot]'
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/checkSVGCompression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths: ['**.svg']

permissions:
Expand All @@ -17,7 +17,7 @@ concurrency:
jobs:
compress-svg:
name: Compress SVG check
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }}
if: ${{ (github.actor != 'OSBotify' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }}
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/checkValidateCodeTerminology.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ name: Check validateCode terminology
on:
pull_request:
types: [opened, synchronize]
branches: [main]
branches: [main, staging]
paths: ['**.ts', '**.tsx', '**.md']

jobs:
check:
if: github.actor != 'os-botify[bot]'
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cloudflareWorkerTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Cloudflare Worker tests
on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths:
- 'web/cloudflare-worker/**'
# The tests check its inline scripts against the CSP hashes.
Expand All @@ -21,7 +21,7 @@ permissions:
jobs:
test:
name: Cloudflare Worker tests
if: github.actor != 'OSBotify'
if: github.actor != 'OSBotify' && github.actor != 'os-botify[bot]'
runs-on: blacksmith-2vcpu-ubuntu-2404
defaults:
run:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ name: Spell check
on:
pull_request:
types: [opened, synchronize]
branches: [main]
branches: [main, staging]
Comment thread
Beamanator marked this conversation as resolved.
Resolved

jobs:
spellcheck:
if: github.actor != 'os-botify[bot]'
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: useblacksmith/checkout@0647fdbab2614a5eb86d2971070e325060d91056 # v1.7.0
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/knip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Knip check
on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths:
- '**.js'
- '**.jsx'
Expand All @@ -24,7 +24,11 @@ concurrency:
jobs:
knip-compare:
name: Compare knip issues against main
if: github.actor != 'os-botify[bot]'
runs-on: blacksmith-2vcpu-ubuntu-2404
env:
# The PR's target branch, so a PR into staging is not compared with main.
BASE_REF: ${{ github.base_ref || 'main' }}
steps:
- name: Checkout PR
uses: useblacksmith/checkout@0647fdbab2614a5eb86d2971070e325060d91056 # v1.7.0
Expand All @@ -35,12 +39,12 @@ jobs:
- name: Run knip on PR
run: KNIP=true npx knip --reporter json --no-exit-code > /tmp/knip-pr.json

- name: Checkout main
- name: Checkout base branch
run: |
git fetch origin main --no-tags --depth=1
git checkout origin/main
git fetch origin "$BASE_REF" --no-tags --depth=1
git checkout "origin/$BASE_REF"

- name: Run knip on main
- name: Run knip on base branch
run: KNIP=true npx knip --reporter json --no-exit-code > /tmp/knip-main.json

- name: Restore PR workspace
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths:
[
'**.js',
Expand All @@ -30,7 +30,7 @@ concurrency:
jobs:
lint:
name: ESLint check
if: ${{ github.event.head_commit.author.name != 'OSBotify' || github.event_name == 'push' }}
if: ${{ (github.event.head_commit.author.name != 'OSBotify' || github.event_name == 'push') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }}
# A cold-cache run loads the full TypeScript program into every worker (~12GB each), plus any extra
# tsconfig project a file is mapped to. 2 workers need more than the 32GB an 8vcpu runner has.
runs-on: blacksmith-16vcpu-ubuntu-2404
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/nativeDependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths:
- '.github/workflows/nativeDependencies.yml'
- 'ios/Podfile'
Expand Down Expand Up @@ -37,6 +37,7 @@ concurrency:
jobs:
nativeDependencies:
name: Check for unused native dependencies
if: github.actor != 'os-botify[bot]'
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/oxfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths: ['**.js', '**.ts', '**.tsx', '**.json', '**.mjs', '**.cjs', '**.yml', '**.yaml', '.oxfmtrc.json', 'config/.editorconfig', '.watchmanconfig', '.imgbotconfig']

concurrency:
Expand All @@ -14,7 +14,7 @@ concurrency:
jobs:
oxfmt:
name: Oxfmt check
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }}
if: ${{ (github.actor != 'OSBotify' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }}
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/oxlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths: ['**.js', '**.ts', '**.tsx', '**.json', '**.mjs', '**.cjs', 'oxlint.config.mts', 'config/oxlint/**', 'scripts/lint/**', '.github/workflows/oxlint.yml']

concurrency:
Expand All @@ -14,7 +14,7 @@ concurrency:
jobs:
oxlint:
name: Oxlint check (non-blocking)
if: ${{ github.event.head_commit.author.name != 'OSBotify' || github.event_name == 'push' }}
if: ${{ (github.event.head_commit.author.name != 'OSBotify' || github.event_name == 'push') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }}
runs-on: blacksmith-8vcpu-ubuntu-2404
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/react-compiler-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths: ['**.ts', '**.tsx']

concurrency:
Expand All @@ -13,7 +13,7 @@ concurrency:
jobs:
react-compiler-compliance:
name: React Compiler Compliance
if: ${{ github.actor != 'OSBotify' }}
if: ${{ github.actor != 'OSBotify' && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }}
runs-on: blacksmith-4vcpu-ubuntu-2404

steps:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/reassurePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Reassure Performance Tests
on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
# Ordered: the last matching pattern wins.
paths:
- '**'
Expand Down Expand Up @@ -64,7 +64,7 @@ concurrency:

jobs:
baseline-perf-tests:
if: ${{ github.actor != 'OSBotify' }}
if: ${{ github.actor != 'OSBotify' && github.actor != 'os-botify[bot]' }}
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout
Expand All @@ -91,7 +91,7 @@ jobs:

# Before setupNode: the key hashes no lockfile, and not running setupNode is most of the saving.
# Restore-only for the same reasons as the Jest transform cache below.
- name: Restore the baseline measured on main
- name: Restore the cached baseline
id: restoreBaseline
# v5.0.1
uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb
Expand All @@ -107,9 +107,9 @@ jobs:
CACHE_HIT: ${{ steps.restoreBaseline.outputs.cache-hit }}
run: |
if [[ "$CACHE_HIT" == "true" ]]; then
echo "::notice::Restored main's baseline for $BASELINE_SHA from the cache; not measuring it here."
echo "::notice::Restored the baseline for $BASELINE_SHA from the cache; not measuring it here."
else
echo "::warning::No cached baseline for $BASELINE_SHA - measuring it in this job. Expected when the seed run on that commit has not finished or failed; otherwise seedJestPerfCache.yml has stopped writing the entry."
echo "::warning::No cached baseline for $BASELINE_SHA - measuring it in this job. Expected when the PR targets a branch other than main (seedJestPerfCache.yml only seeds main), or when the seed run on that commit has not finished or failed; otherwise seedJestPerfCache.yml has stopped writing the entry."
fi

- name: Check out the baseline commit
Expand All @@ -119,7 +119,7 @@ jobs:
BASELINE_SHA: ${{ steps.baselineCommit.outputs.sha }}
run: |
set -e
# That commit, not the tip of main: the tip moves mid-run, and measuring the two sides at
# That commit, not the tip of the base branch: the tip moves mid-run, and measuring the two sides at
# different trees is the noise this comparison exists to detect. Only its source tree is
# needed, and a reachable SHA can be fetched bare.
git fetch origin "$BASELINE_SHA" --no-tags --depth=1
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
include-hidden-files: true

branch-perf-tests:
if: ${{ github.actor != 'OSBotify' }}
if: ${{ github.actor != 'OSBotify' && github.actor != 'os-botify[bot]' }}
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
include-hidden-files: true

validate-perf-tests:
if: ${{ github.actor != 'OSBotify' }}
if: ${{ github.actor != 'OSBotify' && github.actor != 'os-botify[bot]' }}
runs-on: blacksmith-4vcpu-ubuntu-2404
needs: [baseline-perf-tests, branch-perf-tests]
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/shellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
workflow_call:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths: ['**.sh']

jobs:
lint:
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }}
if: ${{ (github.actor != 'OSBotify' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }}
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths: ['**.js', '**.ts', '**.tsx', 'package.json', 'package-lock.json']

concurrency:
Expand All @@ -13,7 +13,7 @@ concurrency:

jobs:
jest:
if: ${{ github.event.head_commit.author.name != 'OSBotify' && github.event.head_commit.author.name != 'imgbot[bot]' || github.event_name == 'workflow_call' }}
if: ${{ (github.event.head_commit.author.name != 'OSBotify' && github.event.head_commit.author.name != 'imgbot[bot]' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }}
runs-on: blacksmith-8vcpu-ubuntu-2404
env:
CI: true
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
fail_ci_if_error: false

storybookTests:
if: ${{ github.event.head_commit.author.name != 'OSBotify' && github.event.head_commit.author.name != 'imgbot[bot]' || github.event_name == 'workflow_call' }}
if: ${{ (github.event.head_commit.author.name != 'OSBotify' && github.event.head_commit.author.name != 'imgbot[bot]' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }}
runs-on: blacksmith-4vcpu-ubuntu-2404
name: Storybook tests
steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/testSyncVersions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Test syncVersions script
on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths: ['.github/scripts/syncVersions.sh', 'tests/tooling/SyncVersions.test.ts', '.github/workflows/testSyncVersions.yml']

concurrency:
Expand All @@ -15,6 +15,7 @@ concurrency:

jobs:
testSyncVersions:
if: github.actor != 'os-botify[bot]'
runs-on: blacksmith-6vcpu-macos-latest
steps:
- name: Check out
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
branches-ignore: [production]
paths: ['**.js', '**.ts', '**.tsx', 'package.json', 'package-lock.json', '**/tsconfig*.json']

concurrency:
Expand All @@ -13,8 +13,12 @@ concurrency:

jobs:
typecheck:
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }}
if: ${{ (github.actor != 'OSBotify' || github.event_name == 'workflow_call') && (github.event_name != 'pull_request' || github.actor != 'os-botify[bot]') }}
runs-on: blacksmith-4vcpu-ubuntu-2404
env:
# The PR's target branch, so a PR into staging is not compared with main.
# Reusable calls have no base ref, so they retain the existing main behavior.
BASE_REF: ${{ github.base_ref || 'main' }}
steps:
- uses: useblacksmith/checkout@0647fdbab2614a5eb86d2971070e325060d91056 # v1.7.0

Expand All @@ -27,14 +31,14 @@ jobs:

- name: Check for new JavaScript files
run: |
git fetch origin main --no-tags --depth=1
git fetch origin "$BASE_REF" --no-tags --depth=1

# Explanation:
# - comm is used to get the intersection between two bash arrays
# - git diff is used to see the files that were added on this branch
# - gh pr view is used to list files touched by this PR. Git diff may give false positives if the branch isn't up-to-date with main
# - gh pr view is used to list files touched by this PR. Git diff may give false positives if the branch isn't up-to-date with the base branch
# - wc counts the words in the result of the intersection
count_new_js=$(comm -1 -2 <(git diff --name-only --diff-filter=A origin/main HEAD -- 'src/*.js' '__mocks__/*.js' '.storybook/*.js' 'assets/*.js' 'config/*.js' 'jest/*.js' 'scripts/*.js' 'tests/*.js' '.github/libs/*.js' '.github/scripts/*.js' ':!src/libs/SearchParser/*.js' ':!config/babel/*.js') <(gh pr view ${{ github.event.pull_request.number }} --json files | jq -r '.files | map(.path) | .[]') | wc -l)
count_new_js=$(comm -1 -2 <(git diff --name-only --diff-filter=A "origin/$BASE_REF" HEAD -- 'src/*.js' '__mocks__/*.js' '.storybook/*.js' 'assets/*.js' 'config/*.js' 'jest/*.js' 'scripts/*.js' 'tests/*.js' '.github/libs/*.js' '.github/scripts/*.js' ':!src/libs/SearchParser/*.js' ':!config/babel/*.js') <(gh pr view ${{ github.event.pull_request.number }} --json files | jq -r '.files | map(.path) | .[]') | wc -l)
if [ "$count_new_js" -gt "0" ]; then
echo "ERROR: Found new JavaScript files in the project; use TypeScript instead."
exit 1
Expand Down
Loading
Loading