From b492804fc2fe353c0f8d526eb5d8369b836929ae Mon Sep 17 00:00:00 2001 From: Gabriel Taveira Date: Sun, 26 Jul 2026 20:22:32 -0300 Subject: [PATCH] ci: add a branch checkup workflow The repo has husky running lint and typecheck on commit and commitlint on the message, but nothing on the server, so a PR from a fork or a commit made with `--no-verify` went unchecked. Same shape as react-native-magic-modal's branch checkup, minus the pnpm, turbo and expo-doctor parts this repo doesn't have. Runs on PRs and on pushes to master: lint, typecheck, test, then `bob build`. --- .github/workflows/branch-validation.yml | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/branch-validation.yml diff --git a/.github/workflows/branch-validation.yml b/.github/workflows/branch-validation.yml new file mode 100644 index 0000000..10fd2d3 --- /dev/null +++ b/.github/workflows/branch-validation.yml @@ -0,0 +1,48 @@ +name: ๐Ÿ› ๏ธ Branch Checkup + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + checkup: + name: ๐Ÿ‘ฎโ€โ™‚๏ธ Lint, Typecheck, Test and Build + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ— Setup Repo + uses: actions/checkout@v7 + + - name: ๐Ÿ— Setup Node + uses: actions/setup-node@v7 + with: + node-version: 24 + cache: yarn + + # `.yarnrc` points `yarn-path` at scripts/bootstrap.js, which forwards to + # yarn whenever arguments are passed and otherwise installs the example + # app and the pods too. Passing the flags keeps it to the library. + - name: ๐Ÿ“ฆ Install Dependencies + run: yarn install --frozen-lockfile + + - name: ๐Ÿงน Lint + run: yarn lint + + - name: ๐Ÿงช Typecheck + run: yarn typescript + + - name: ๐Ÿงช Test + run: yarn test + + # `prepare` runs `bob build`, so the install above already built once. + # Running it again is what fails the job if the build breaks. + - name: ๐Ÿ› ๏ธ Build + run: yarn prepare