1- name : Full CI
1+ name : CI
2+
23on :
34 push :
4- branches :
5- - main
6- - dev
5+ branches : [main]
76 pull_request :
87 workflow_dispatch :
98
@@ -12,89 +11,57 @@ concurrency:
1211 cancel-in-progress : true
1312
1413jobs :
15- detect-changes :
14+ lint :
1615 runs-on : ubuntu-latest
17- outputs :
18- giskard-core : ${{ steps.filter.outputs.giskard-core }}
19- giskard-agents : ${{ steps.filter.outputs.giskard-agents }}
20- giskard-checks : ${{ steps.filter.outputs.giskard-checks }}
16+ timeout-minutes : 10
2117 steps :
22- - name : Checkout code
23- uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
24-
25- - name : Detect changed libraries
26- uses : dorny/paths-filter@v3
27- id : filter
18+ - uses : actions/checkout@v4
19+ - uses : astral-sh/setup-uv@v7
2820 with :
29- filters : |
30- giskard-core:
31- - 'libs/giskard-core/**'
32- giskard-agents:
33- - 'libs/giskard-agents/**'
34- giskard-checks:
35- - 'libs/giskard-checks/**'
21+ enable-cache : true
22+ python-version : " 3.12"
23+ - run : make install install-tools
24+ - run : make check
3625
37- pre_checks :
26+ test-unit :
27+ needs : lint
3828 runs-on : ubuntu-latest
39- timeout-minutes : 30
29+ timeout-minutes : 15
30+ strategy :
31+ fail-fast : false
32+ matrix :
33+ python-version : ["3.12", "3.13"]
34+ package : [giskard-core, giskard-agents, giskard-checks]
35+ name : test-unit / ${{ matrix.package }} / ${{ matrix.python-version }}
4036 steps :
41- - name : Checkout code
42- uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
43-
44- - name : Install uv
45- uses : astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7
46-
47- - name : Setup development environment
48- run : make setup
49-
50- - name : Run all checks
51- run : make check
37+ - uses : actions/checkout@v4
38+ - uses : astral-sh/setup-uv@v7
39+ with :
40+ enable-cache : true
41+ python-version : ${{ matrix.python-version }}
42+ - run : make install
43+ - run : make test-unit PACKAGE=${{ matrix.package }}
5244
53- test :
45+ test-functional :
46+ needs : lint
5447 runs-on : ubuntu-latest
55- needs : [detect-changes]
56- if : |
57- github.ref == 'refs/heads/main' ||
58- needs.detect-changes.outputs.giskard-core == 'true' ||
59- needs.detect-changes.outputs.giskard-agents == 'true' ||
60- needs.detect-changes.outputs.giskard-checks == 'true'
61- env :
62- TEST_MODEL : " gemini/gemini-2.0-flash"
63- GEMINI_API_KEY : ${{ secrets.GEMINI_API_KEY }}
48+ environment : CI
6449 timeout-minutes : 30
6550 strategy :
66- fail-fast : true
51+ fail-fast : false
6752 matrix :
6853 python-version : ["3.12", "3.13"]
54+ package : [giskard-core, giskard-agents, giskard-checks]
55+ name : test-functional / ${{ matrix.package }} / ${{ matrix.python-version }}
56+ env :
57+ GEMINI_API_KEY : ${{ secrets.GEMINI_API_KEY }}
58+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
59+ TEST_MODEL : " gemini/gemini-2.0-flash"
6960 steps :
70- - name : Checkout code
71- uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
72-
73- - name : Install uv and set the python version
74- uses : astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7
61+ - uses : actions/checkout@v4
62+ - uses : astral-sh/setup-uv@v7
7563 with :
64+ enable-cache : true
7665 python-version : ${{ matrix.python-version }}
77-
78- - name : Setup development environment
79- run : make setup
80-
81- - name : Run tests for giskard-core
82- if : |
83- github.ref == 'refs/heads/main' ||
84- needs.detect-changes.outputs.giskard-core == 'true'
85- run : make test-giskard-core
86-
87- - name : Run tests for giskard-agents
88- if : |
89- github.ref == 'refs/heads/main' ||
90- needs.detect-changes.outputs.giskard-core == 'true' ||
91- needs.detect-changes.outputs.giskard-agents == 'true'
92- run : make test-giskard-agents
93-
94- - name : Run tests for giskard-checks
95- if : |
96- github.ref == 'refs/heads/main' ||
97- needs.detect-changes.outputs.giskard-core == 'true' ||
98- needs.detect-changes.outputs.giskard-agents == 'true' ||
99- needs.detect-changes.outputs.giskard-checks == 'true'
100- run : make test-giskard-checks
66+ - run : make install
67+ - run : make test-functional PACKAGE=${{ matrix.package }}
0 commit comments