-
-
Notifications
You must be signed in to change notification settings - Fork 28
139 lines (116 loc) · 3.99 KB
/
ci.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Continuous Integration
on:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
ci:
name: CI
permissions: write-all
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.4.0
with:
version: 7.x.x
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- uses: supabase/setup-cli@v1
with:
version: 1.77.4
- name: Start Supabase
run: supabase start
- name: 🦺 Check Format and Lint
id: static
run: pnpm run turbo format:check lint:report
continue-on-error: true
- name: 💍 Merge lint reports
run: |
shopt -s globstar
jq -s '[.[]]|flatten' ./**/lint-results/*.json &> eslint_report.json
- name: 👸 Annotate Code Linting Results
uses: ataylorme/eslint-annotate-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
report-json: "eslint_report.json"
continue-on-error: true
- name: ☁️ Upload ESLint report
uses: actions/upload-artifact@v3
with:
name: eslint_report.json
path: eslint_report.json
continue-on-error: true
- name: 📦 Build Packages
id: build
run: pnpm run build:packages
continue-on-error: true
- name: 🚧 Test
id: test
run: pnpm run test
continue-on-error: true
- name: Upload postgrest-filter coverage
uses: codecov/codecov-action@v3
with:
files: ./packages/postgrest-filter/coverage/coverage-final.json
flags: postgrest-filter
fail_ci_if_error: false
- name: Upload postgrest-mutate coverage
uses: codecov/codecov-action@v3
with:
files: ./packages/postgrest-mutate/coverage/coverage-final.json
flags: postgrest-mutate
fail_ci_if_error: false
- name: Upload postgrest-swr coverage
uses: codecov/codecov-action@v3
with:
files: ./packages/postgrest-swr/coverage/coverage-final.json
flags: postgrest-swr
fail_ci_if_error: false
- name: Upload postgrest-fetcher coverage
uses: codecov/codecov-action@v3
with:
files: ./packages/postgrest-fetcher/coverage/coverage-final.json
flags: postgrest-fetcher
fail_ci_if_error: false
- name: Upload storage-fetcher coverage
uses: codecov/codecov-action@v3
with:
files: ./packages/storage-fetcher/coverage/coverage-final.json
flags: storage-fetcher
fail_ci_if_error: false
- name: Upload storage-mutate coverage
uses: codecov/codecov-action@v3
with:
files: ./packages/storage-mutate/coverage/coverage-final.json
flags: storage-mutate
fail_ci_if_error: false
- name: Upload storage-swr coverage
uses: codecov/codecov-action@v3
with:
files: ./packages/storage-swr/coverage/coverage-final.json
flags: storage-swr
fail_ci_if_error: false
- name: Upload postgrest-react-query coverage
uses: codecov/codecov-action@v3
with:
files: ./packages/postgrest-react-query/coverage/coverage-final.json
flags: postgrest-react-query
fail_ci_if_error: false
- name: Upload storage-react-query coverage
uses: codecov/codecov-action@v3
with:
files: ./packages/storage-react-query/coverage/coverage-final.json
flags: storage-react-query
fail_ci_if_error: false
- name: ⚠️ Check for error
if: steps.static.outcome != 'success' || steps.build.outcome != 'success' || steps.test.outcome != 'success'
run: exit 1