chore: crowdin action #9202
This file contains hidden or 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: Code checks | |
on: | |
merge_group: | |
push: | |
branches: | |
- '**' | |
jobs: | |
lint-prettier: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/provision | |
- name: Lint Prettier | |
run: pnpm format:check | |
lint-syncpack: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/provision | |
- name: Lint Packages with Syncpack | |
run: pnpm syncpack:lint | |
lint-eslint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/provision | |
- name: Lint Eslint | |
run: pnpm build && pnpm lint | |
typecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/provision | |
- name: Run typecheck recursively in each package | |
run: pnpm build && pnpm typecheck | |
lint-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Lint commit message | |
uses: wagoid/commitlint-github-action@v6 | |
lint-deps: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/provision | |
- name: Lint dependency rules | |
run: pnpm build && pnpm lint:deps | |
lint-filenames: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/provision | |
- name: Lint dependency rules | |
run: pnpm lint:filenames | |
test-unit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/provision | |
- run: pnpm build | |
- name: Run unit tests with code coverage | |
run: pnpm test:unit | |
test-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/provision | |
with: | |
fetch-depth: 0 | |
- run: pnpm build | |
- name: Run unit tests with code coverage | |
run: pnpm test:coverage | |
- name: Upload results to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
files: ./app/mobile/coverage/.tmp/coverage-0.json | |
lingui-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/provision | |
- name: Run lingui | |
working-directory: ./apps/mobile | |
run: pnpm lingui compile --strict | |
# TODO ENG-14 - this should only run on changes to the mobile app | |
# - name: Check for changes in mobile | |
# id: check_changes | |
# run: | | |
# if git diff --name-only HEAD^ HEAD | grep -q "^apps/mobile/"; then | |
# echo "changes_detected=true" >> $GITHUB_OUTPUT | |
# else | |
# echo "changes_detected=false" >> $GITHUB_OUTPUT | |
# fi | |
# - name: Run lingui | |
# if: steps.check_changes.outputs.changes_detected == 'true' | |
# working-directory: ./apps/mobile | |
# run: pnpm lingui compile --strict |