[chore] Update lint and config to be more consistent with other expo codebases #452
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: review | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, synchronize] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🏗 Setup repo | |
uses: actions/checkout@v4 | |
- name: 🏗 Setup runner | |
uses: ./.github/actions/setup | |
- name: 📦 Install dependencies | |
run: bun install | |
- name: ✅ Lint code | |
run: bun run lint --max-warnings=0 | |
- name: 🧪 Test code | |
run: bun run test | |
- name: 👷 Build code | |
run: bun run clean && bun run build | |
- name: 🕵️ Validate build | |
id: diff | |
run: | | |
if [ "$(git diff --ignore-space-at-eol build/ | wc -l)" -gt "0" ]; then | |
echo "⚠️ Build is outdated" | |
echo " > run 'bun run clean', 'bun run build', and commit changes" | |
git diff | |
exit 1 | |
fi | |
- name: 🗂 Upload build | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() && steps.diff.conclusion == 'failure' }} | |
with: | |
name: build | |
path: build/ |