-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
63 lines (60 loc) · 1.86 KB
/
example-typescript-check-and-lint.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
name: Example Typescript check and lint
env:
YARN_ENABLE_HARDENED_MODE: 0
on:
pull_request:
merge_group:
branches:
- main
push:
branches:
- main
workflow_call:
workflow_dispatch:
jobs:
check:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: ubuntu-latest
strategy:
matrix:
working-directory: [
apps/common-app,
apps/fabric-example,
apps/macos-example,
# apps/next-example, # next-example doesn't use TypeScript.
apps/paper-example,
apps/tvos-example,
apps/web-example,
]
concurrency:
group: typescript-${{ matrix.working-directory }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
cache: 'yarn'
- name: Clear annotations
run: .github/workflows/helper/clear-annotations.sh
- name: Install monorepo node dependencies
run: yarn install --immutable
- name: Build Reanimated package
working-directory: packages/react-native-reanimated
run: yarn build
- name: Check types
working-directory: ${{ matrix.working-directory }}
if: ${{ matrix.working-directory != 'apps/web-example' }}
run: yarn tsc --noEmit
- name: Check types
working-directory: ${{ matrix.working-directory }}
if: ${{ matrix.working-directory == 'apps/web-example' }}
run: yarn tsc --noEmit --baseUrl ../..
- name: Lint
working-directory: ${{ matrix.working-directory }}
run: yarn lint
- name: Build WebExample
working-directory: ${{ matrix.working-directory }}
if: ${{ matrix.working-directory == 'apps/web-example' }}
run: yarn build