-
Notifications
You must be signed in to change notification settings - Fork 5
108 lines (89 loc) · 2.5 KB
/
code-checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
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
check-translation-strings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/provision
- name: Check translation strings extraction
run: pnpm --dir ./apps/mobile run lingui:extract
- name: Fail if there are uncommited translations
run: git diff-index --quiet HEAD --
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 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@v4
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