Commit 87b385f 1 parent 0c3f6fd commit 87b385f Copy full SHA for 87b385f
File tree 11 files changed +59
-9
lines changed
11 files changed +59
-9
lines changed Original file line number Diff line number Diff line change 8
8
type : number
9
9
required : false
10
10
default : 3.8
11
+ # TODO: remove this after restructure and standardize source path.
12
+ source-path :
13
+ description : " The path to the source files."
14
+ type : string
15
+ required : false
16
+ default : " api"
11
17
secrets :
12
18
CODECOV_TOKEN :
13
19
description : " The token used to gain access to Codecov."
@@ -22,21 +28,23 @@ jobs:
22
28
secrets : inherit
23
29
with :
24
30
python-version : ${{ inputs.python-version }}
25
- source-path : src
31
+ source-path : ${{ inputs.source-path }}
26
32
27
33
deploy :
28
34
permissions :
29
- id-token : ' write' # TODO: separate build and deploy jobs and create reusable deploy workflow
35
+ id-token : " write" # TODO: separate build and deploy jobs and create reusable deploy workflow
30
36
runs-on : ubuntu-latest
31
37
needs : [validate-pr-refs, test]
32
38
# Deploy if:
33
39
# - the previous jobs did not fail (see [needs]).
34
40
# - the workflow was not cancelled.
35
41
# - the repo's owner is Ocado Tech.
42
+ # - the repo is not the backend template.
36
43
# - a change is made to an environment's branch.
37
44
if : |
38
45
always() && !failure() && !cancelled() &&
39
- github.repository_owner_id == 2088731 && (
46
+ github.repository_owner_id == 2088731 &&
47
+ github.repository_id != 610204172 && (
40
48
github.ref_name == 'production' ||
41
49
github.ref_name == 'development' ||
42
50
github.ref_name == 'staging'
Original file line number Diff line number Diff line change 16
16
[submodule "codeforlife-package-javascript "]
17
17
path = codeforlife-package-javascript
18
18
url = https://github.com/ocadotechnology/codeforlife-package-javascript.git
19
- [submodule "codeforlife-service-template "]
20
- path = codeforlife-service-template
21
- url = https://github.com/ocadotechnology/codeforlife-service-template.git
22
19
[submodule "codeforlife-sso "]
23
20
path = codeforlife-sso
24
21
url = https://github.com/ocadotechnology/codeforlife-sso.git
28
25
[submodule "codeforlife-portal-backend "]
29
26
path = codeforlife-portal-backend
30
27
url = https://github.com/ocadotechnology/codeforlife-portal-backend.git
28
+ [submodule "codeforlife-template-backend "]
29
+ path = codeforlife-template-backend
30
+ url = https://github.com/ocadotechnology/codeforlife-template-backend.git
Original file line number Diff line number Diff line change 357
357
] ,
358
358
"description" : "A devcontainer for a backend micro-service." ,
359
359
"submodules" : [
360
+ "codeforlife-template-backend" ,
360
361
"codeforlife-portal-backend"
361
362
] ,
362
363
"vscode" : {
366
367
] ,
367
368
"!python.testing.pytestArgs" : [
368
369
"-n=auto" ,
369
- "--cov=src " ,
370
+ "--cov=api " ,
370
371
"--cov-report=html" ,
371
372
"-c=pyproject.toml" ,
372
- "src "
373
+ "api "
373
374
]
374
375
} ,
375
376
"tasks" : {
396
397
"runserver" ,
397
398
"localhost:8000"
398
399
] ,
400
+ "env" : {
401
+ "?SERVICE_NAME" : "replace-me"
402
+ } ,
399
403
"preLaunchTask" : "setup"
400
404
}
401
405
]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ rm -f Pipfile.lock
5
+ shopt -s extglob
6
+ rm -rf .venv/! (" .gitkeep" )
7
+ shopt -u extglob
8
+ pipenv install --dev
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ wget -O - https://raw.githubusercontent.com/ocadotechnology/codeforlife-workspace/main/scripts/backend/setup | bash
5
+
6
+ pipenv run python manage.py runserver localhost:8000
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ pipenv install --dev
5
+ pipenv run python manage.py migrate --noinput
6
+ pipenv run python manage.py load_fixtures api
7
+ pipenv run python manage.py collectstatic --noinput --clear
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ rm -f yarn.lock
5
+ rm -rf node_modules
6
+ yarn cache clean codeforlife
7
+ yarn install --production=false
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ wget -O - https://raw.githubusercontent.com/ocadotechnology/codeforlife-workspace/main/scripts/frontend/setup | bash
5
+
6
+ yarn dev
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ yarn install --production=false
You can’t perform that action at this time.
0 commit comments