File tree Expand file tree Collapse file tree 3 files changed +63
-12
lines changed Expand file tree Collapse file tree 3 files changed +63
-12
lines changed Original file line number Diff line number Diff line change 1
- name : Code Quality and Kedro Run Check
1
+ name : Code Quality Checks
2
2
3
3
on :
4
4
push :
@@ -13,26 +13,23 @@ jobs:
13
13
runs-on : ubuntu-latest
14
14
steps :
15
15
- uses : actions/checkout@v3
16
-
17
16
- name : Set up Python
18
17
uses : actions/setup-python@v4
19
18
with :
20
19
python-version : ' 3.8'
21
-
22
20
- name : Install Python tools (Black with Jupyter, Bandit, Ruff)
23
21
run : pip install "black[jupyter]" bandit ruff
24
-
25
22
- name : Auto-fix Formatting Issues with Black
26
23
run : black .
27
-
28
24
- name : Auto-fix Linting Errors with Ruff
29
25
run : ruff --fix .
30
-
31
26
- name : Security Check with Bandit
32
27
run : bandit -r .
33
-
34
- - name : Install Kedro project dependencies
35
- run : pip install -r docker-requirements.txt
36
-
37
- - name : Run Kedro Pipeline
38
- run : kedro run
28
+ # Commit and push changes made by Black and Ruff
29
+ - name : Commit and push if changed
30
+ run : |
31
+ git config --global user.name 'github-actions'
32
+ git config --global user.email '[email protected] '
33
+ git add -A
34
+ git commit -m "Automated code quality fixes" -a || echo "No changes to commit"
35
+ git push
Original file line number Diff line number Diff line change
1
+ name : Test Code with Docker
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+ test-code :
13
+ runs-on : ubuntu-latest
14
+ services :
15
+ docker :
16
+ image : docker:19.03.12
17
+ options : --privileged
18
+ steps :
19
+ - uses : actions/checkout@v3
20
+ - name : Set up Python
21
+ uses : actions/setup-python@v4
22
+ with :
23
+ python-version : ' 3.8'
24
+ - name : Install Kedro and Docker plugin
25
+ run : pip install -r dev-requirements.txt
26
+ - name : Configure Docker
27
+ run : sudo service docker start
28
+ - name : Build docker image (using Kedro-Docker)
29
+ run : kedro docker build
30
+ - name : Run the docker container (using Kedro-Docker)
31
+ run : kedro docker run
Original file line number Diff line number Diff line change
1
+ name : Test Code Without Docker
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+ test-code :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v3
16
+ - name : Set up Python
17
+ uses : actions/setup-python@v4
18
+ with :
19
+ python-version : ' 3.8'
20
+ - name : Install Kedro project dependencies
21
+ run : pip install -r docker-requirements.txt
22
+ - name : Run Kedro Pipeline
23
+ run : kedro run
You can’t perform that action at this time.
0 commit comments