27
27
run : |
28
28
echo "Pull requests are only allowed against the 'develop-postgres' branch. Please refer to the pull request guidelines."
29
29
echo "Error: Close this PR and try again."
30
- exit 1
31
-
30
+ exit 1
31
+
32
32
Code-Quality-Checks :
33
33
name : Checking code quality
34
34
runs-on : ubuntu-latest
86
86
87
87
- name : Run Python script
88
88
run : |
89
- python .github/workflows/scripts/code_coverage_disable_check.py --files ${{ steps.changed-files.outputs.all_changed_files }}
89
+ python .github/workflows/scripts/code_coverage_disable_check.py --files ${{ steps.changed-files.outputs.all_changed_files }}
90
90
91
91
check_gql_tada :
92
92
name : Check gql tada files and configuration
98
98
run : docker buildx build --file ./docker/api.Containerfile --tag talawa_api --target non_production ./
99
99
- name : Check gql tada
100
100
run : docker container run talawa_api pnpm check_gql_tada
101
-
101
+
102
102
check_drizzle_migrations :
103
103
name : Check drizzle migration files
104
104
runs-on : ubuntu-latest
@@ -109,7 +109,7 @@ jobs:
109
109
run : docker buildx build --file ./docker/api.Containerfile --tag talawa_api --target non_production ./
110
110
- name : Check drizzle migrations
111
111
run : docker container run --env-file ./envFiles/.env.ci talawa_api pnpm check_drizzle_migrations
112
-
112
+
113
113
check_type_errors :
114
114
name : Check type errors
115
115
runs-on : ubuntu-latest
@@ -127,71 +127,73 @@ jobs:
127
127
needs : [Code-Quality-Checks]
128
128
runs-on : ubuntu-latest
129
129
steps :
130
- - name : Checkout this repository
131
-
132
- - id : changed_files
133
- name : Get changed files
134
- uses :
tj-actions/[email protected]
135
- with :
136
- files : |
137
- .coderabbit.yaml
138
- Caddyfile
139
- codegen.ts
140
- Dockerfile*
141
- docker-compose*
142
- .dockerignore
143
- .env.sample
144
- .env_test
145
- eslint.config.mjs
146
- envFiles/**
147
- .gitignore
148
- init-mongo.sh
149
- .prettierignore
150
- .prettierrc.json
151
- .pylintrc
152
- .github/**
153
- biome.jsonc
154
- drizzle_migrations/**
155
- renovate.json
156
- requirements.txt
157
- schema.graphql
158
- CODEOWNERS
159
- LICENSE
160
- tsconfig.json
161
- vitest.config.ts
162
- pnpm-lock.yaml
163
- package.json
164
- package-lock.json
165
- .nojekyll
166
- docs/docusaurus.config.ts
167
- docs/sidebar*
168
- setup.ts
169
- tsconfig.build.json
170
- vite.config.mts
171
- CNAME
172
- CODE_OF_CONDUCT.md
173
- CODE_STYLE.md
174
- CONTRIBUTING.md
175
- DOCUMENTATION.md
176
- INSTALLATION.md
177
- ISSUE_GUIDELINES.md
178
- PR_GUIDELINES.md
179
- README.md
180
- - env :
181
- CHANGED_FILES : ${{ steps.changed_files.outputs.all_changed_files }}
182
- if : steps.changed_files.outputs.any_changed == 'true' || steps.changed_files.outputs.any_deleted == 'true'
183
- name : Show changed files
184
- run : |
185
- echo "Unauthorized changes were made in the following files:"
186
- for FILE in ${CHANGED_FILES}; do
187
- echo "$FILE"
188
- done
189
- echo "To override this, apply the 'ignore-sensitive-files-pr' label"
190
- exit 1
191
-
130
+ - name : Checkout this repository
131
+
132
+ - id : changed_files
133
+ name : Get changed files
134
+ uses :
tj-actions/[email protected]
135
+ with :
136
+ files : |
137
+ .coderabbit.yaml
138
+ Caddyfile
139
+ codegen.ts
140
+ Dockerfile*
141
+ docker-compose*
142
+ .dockerignore
143
+ .env.sample
144
+ .env_test
145
+ eslint.config.mjs
146
+ envFiles/**
147
+ .gitignore
148
+ init-mongo.sh
149
+ .prettierignore
150
+ .prettierrc.json
151
+ .pylintrc
152
+ .github/**
153
+ biome.jsonc
154
+ drizzle_migrations/**
155
+ renovate.json
156
+ requirements.txt
157
+ schema.graphql
158
+ CODEOWNERS
159
+ LICENSE
160
+ tsconfig.json
161
+ vitest.config.ts
162
+ pnpm-lock.yaml
163
+ package.json
164
+ package-lock.json
165
+ .nojekyll
166
+ docs/docusaurus.config.ts
167
+ docs/sidebar*
168
+ setup.ts
169
+ tsconfig.build.json
170
+ vite.config.mts
171
+ CNAME
172
+ CODE_OF_CONDUCT.md
173
+ CODE_STYLE.md
174
+ CONTRIBUTING.md
175
+ DOCUMENTATION.md
176
+ INSTALLATION.md
177
+ ISSUE_GUIDELINES.md
178
+ PR_GUIDELINES.md
179
+ README.md
180
+ - env :
181
+ CHANGED_FILES : ${{ steps.changed_files.outputs.all_changed_files }}
182
+ if : steps.changed_files.outputs.any_changed == 'true' || steps.changed_files.outputs.any_deleted == 'true'
183
+ name : Show changed files
184
+ run : |
185
+ echo "Unauthorized changes were made in the following files:"
186
+ for FILE in ${CHANGED_FILES}; do
187
+ echo "$FILE"
188
+ done
189
+ echo "To override this, apply the 'ignore-sensitive-files-pr' label"
190
+ exit 1
191
+
192
192
Run-Tests :
193
193
name : Run tests for talawa api
194
194
runs-on : ubuntu-latest
195
+ needs :
196
+ [Code-Quality-Checks, Check-ESlint-Disable, Check-Code-Coverage-Disable]
195
197
steps :
196
198
- name : Checkout this repository
197
199
@@ -201,12 +203,25 @@ jobs:
201
203
run : docker compose build
202
204
- name : Run tests
203
205
run : docker compose up --exit-code-from api
206
+ - name : Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
207
+ uses : codecov/codecov-action@v4
208
+ with :
209
+ verbose : true
210
+ token : ${{ secrets.CODECOV_TOKEN }}
211
+ fail_ci_if_error : false
212
+ name : " ${{env.CODECOV_UNIQUE_NAME}}"
213
+
214
+ - name : Test acceptable level of code coverage
215
+ uses : VeryGoodOpenSource/very_good_coverage@v2
216
+ with :
217
+ path : " ./coverage/lcov.info"
218
+ min_coverage : 95.0
204
219
205
220
Test-Docusaurus-Deployment :
206
221
name : Test Deployment to https://docs-api.talawa.io
207
222
runs-on : ubuntu-latest
208
223
needs : [Run-Tests]
209
- # Run only if the develop-postgres branch and not dependabot
224
+ # Run only if the develop-postgres branch and not dependabot
210
225
if : ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.base.ref == 'develop-postgres' }}
211
226
steps :
212
227
- uses : actions/checkout@v4
@@ -290,3 +305,4 @@ jobs:
290
305
run : |
291
306
source venv/bin/activate
292
307
python .github/workflows/scripts/check_docstrings.py --directories .github
308
+
0 commit comments