-
Notifications
You must be signed in to change notification settings - Fork 1
97 lines (78 loc) · 2.14 KB
/
Copy pathci.yml
File metadata and controls
97 lines (78 loc) · 2.14 KB
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
name: CI
on:
push:
branches: [master, development]
paths:
- "expo-app/**"
- "nextjs-api/**"
- ".github/**"
pull_request:
branches: [master, development]
paths:
- "expo-app/**"
- "nextjs-api/**"
- ".github/**"
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
expo-app:
name: Expo App - Lint, Typecheck e Testes
runs-on: ubuntu-latest
defaults:
run:
working-directory: expo-app
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: expo-app/package-lock.json
- name: Instalar dependências
uses: bahmutov/npm-install@v1
with:
working-directory: expo-app
- name: Expo Doctor (opcional)
run: npx expo-doctor || true
- name: Lint
run: npm run -s lint --if-present
- name: Typecheck
run: npm run -s typecheck --if-present
- name: Testes
run: npm run -s test --if-present
- name: Build (web) - opcional
run: npm run -s build --if-present
- name: Artefatos do build web (se existir)
if: success() && hashFiles('expo-app/web-build/**') != ''
uses: actions/upload-artifact@v4
with:
name: expo-web-build
path: expo-app/web-build
nextjs-api:
name: Next.js API - Typecheck e Testes
runs-on: ubuntu-latest
defaults:
run:
working-directory: nextjs-api
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: nextjs-api/package.json
- name: Instalar dependências
uses: bahmutov/npm-install@v1
with:
working-directory: nextjs-api
- name: Typecheck
run: npm run -s typecheck --if-present
- name: Testes
run: npm run -s test --if-present
- name: Build Next.js
run: npm run -s build --if-present