Skip to content

Commit 4016dea

Browse files
authored
Merge pull request Expensify#64611 from Expensify/Rory-DryRunCheck
[No QA] Run generateTranslations dry run on every pull request
2 parents a88ce25 + 5d37470 commit 4016dea

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Generate static translations
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
jobs:
8+
# We always run dry-run the script to verify that it still works.
9+
# The generateTranslations script runs with ts-node, which can't handle Flow
10+
# (the specialized JS that React Native is written in).
11+
# Therefore, adding an import in the wrong place could break the script, even if you didn't modify the script.
12+
dryRun:
13+
runs-on: ubuntu-latest
14+
steps:
15+
# v4
16+
- name: Checkout
17+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
18+
19+
- name: Setup Node
20+
uses: ./.github/actions/composite/setupNode
21+
22+
- name: Run generateTranslations dry run
23+
run: npx ts-node ./scripts/generateTranslations.ts --dry-run
24+
25+
- name: Explain failure
26+
if: failure()
27+
run: |
28+
echo '::error:: 😦 Something you did broke scripts/generateTranslations.ts. Most likely, this means you added an import that caused react-native to be directly or indirectly imported into the script.'
29+
exit 1

0 commit comments

Comments
 (0)