@@ -3,15 +3,15 @@ name: CI
33on :
44 workflow_dispatch :
55 push :
6- branches : [ master, develop ]
6+ branches : [master, develop]
77 paths :
8- - ' engine/**'
9- - ' .github/workflows/ci.yml'
8+ - " engine/**"
9+ - " .github/workflows/ci.yml"
1010 pull_request :
11- branches : [ master, develop ]
11+ branches : [master, develop]
1212 paths :
13- - ' engine/**'
14- - ' .github/workflows/ci.yml'
13+ - " engine/**"
14+ - " .github/workflows/ci.yml"
1515
1616jobs :
1717 test :
@@ -21,92 +21,91 @@ jobs:
2121 working-directory : engine
2222 strategy :
2323 matrix :
24- python-version : [' 3.12', ' 3.13' ]
25-
24+ python-version : [" 3.12", " 3.13" ]
25+
2626 steps :
27- - uses : actions/checkout@v4
28-
29- - name : Set up Python ${{ matrix.python-version }}
30- uses : actions/setup-python@v5
31- with :
32- python-version : ${{ matrix.python-version }}
33- cache : ' pip'
34-
35- - name : Install Poetry
36- uses : snok/install-poetry@v1
37- with :
38- version : latest
39- virtualenvs-create : true
40- virtualenvs-in-project : true
41-
42- - name : Install dependencies
43- run : |
44- poetry install --with dev --no-root
45-
46- - name : Install package
47- run : poetry install --no-dev
48-
49- - name : Run tests with coverage
50- run : |
51- poetry run pytest --cov=codeflow_engine --cov-report=xml --cov-report=term --cov-report=html
52-
53- - name : Upload coverage to Codecov
54- uses : codecov/codecov-action@v4
55- with :
56- file : ./engine/coverage.xml
57- flags : unittests
58- name : codecov-umbrella
59- fail_ci_if_error : false
60- token : ${{ secrets.CODECOV_TOKEN }}
61-
62- - name : Check coverage threshold
63- run : |
64- poetry run coverage report --fail-under=70 || echo "Coverage below 70% - this is a warning, not a failure"
65-
66- - name : Upload coverage HTML report
67- uses : actions/upload-artifact@v4
68- if : always()
69- with :
70- name : coverage-report-${{ matrix.python-version }}
71- path : engine/htmlcov/
72-
73- - name : Run linting
74- run : |
75- poetry run ruff check .
76- poetry run mypy codeflow_engine
27+ - uses : actions/checkout@v4
28+
29+ - name : Set up Python ${{ matrix.python-version }}
30+ uses : actions/setup-python@v5
31+ with :
32+ python-version : ${{ matrix.python-version }}
33+ cache : " pip"
34+
35+ - name : Install Poetry
36+ uses : snok/install-poetry@v1
37+ with :
38+ version : latest
39+ virtualenvs-create : true
40+ virtualenvs-in-project : true
41+
42+ - name : Install dependencies
43+ run : |
44+ poetry install --with dev --no-root
45+
46+ - name : Install package
47+ run : poetry install --no-dev
48+
49+ - name : Run tests with coverage
50+ run : |
51+ poetry run pytest --cov=codeflow_engine --cov-report=xml --cov-report=term --cov-report=html
52+
53+ - name : Upload coverage to Codecov
54+ uses : codecov/codecov-action@v4
55+ with :
56+ file : ./engine/coverage.xml
57+ flags : unittests
58+ name : codecov-umbrella
59+ fail_ci_if_error : false
60+ token : ${{ secrets.CODECOV_TOKEN }}
61+
62+ - name : Check coverage threshold
63+ run : |
64+ poetry run coverage report --fail-under=70 || echo "Coverage below 70% - this is a warning, not a failure"
65+
66+ - name : Upload coverage HTML report
67+ uses : actions/upload-artifact@v4
68+ if : always()
69+ with :
70+ name : coverage-report-${{ matrix.python-version }}
71+ path : engine/htmlcov/
72+
73+ - name : Run linting
74+ run : |
75+ poetry run ruff check .
76+ poetry run mypy codeflow_engine
7777
7878 build :
7979 runs-on : ubuntu-latest
8080 needs : test
8181 defaults :
8282 run :
8383 working-directory : engine
84-
84+
8585 steps :
86- - uses : actions/checkout@v4
87-
88- - name : Set up Python
89- uses : actions/setup-python@v5
90- with :
91- python-version : ' 3.12'
92- cache : ' pip'
93-
94- - name : Install Poetry
95- uses : snok/install-poetry@v1
96- with :
97- version : latest
98- virtualenvs-create : true
99- virtualenvs-in-project : true
100-
101- - name : Build package
102- run : poetry build
103-
104- - name : Check package
105- run : poetry check
106-
107- - name : Upload artifacts
108- uses : actions/upload-artifact@v4
109- with :
110- name : engine-dist
111- path : engine/dist/*
86+ - uses : actions/checkout@v4
87+
88+ - name : Set up Python
89+ uses : actions/setup-python@v5
90+ with :
91+ python-version : " 3.12"
92+ cache : " pip"
93+
94+ - name : Install Poetry
95+ uses : snok/install-poetry@v1
96+ with :
97+ version : latest
98+ virtualenvs-create : true
99+ virtualenvs-in-project : true
100+
101+ - name : Build package
102+ run : poetry build
103+
104+ - name : Check package
105+ run : poetry check
112106
107+ - name : Upload artifacts
108+ uses : actions/upload-artifact@v4
109+ with :
110+ name : engine-dist
111+ path : engine/dist/*
0 commit comments