@@ -23,12 +23,12 @@ jobs:
2323 # - python-version: "3.11"
2424 # os: ubuntu-latest
2525 # experimental: true
26- - python-version : " 3.10"
27- os : macos-latest
28- experimental : true
29- - python-version : " 3.10" # https://github.com/tensorflow/io Does not talk about win 2022
30- os : windows-2022
31- experimental : true
26+ # - python-version: "3.10"
27+ # os: macos-latest
28+ # experimental: true
29+ # - python-version: "3.10" # https://github.com/tensorflow/io Does not talk about win 2022
30+ # os: windows-2022
31+ # experimental: true
3232 - python-version : " 3.10"
3333 os : windows-2019
3434 experimental : true
@@ -43,34 +43,12 @@ jobs:
4343 - name : Checkout code
4444 uses : actions/checkout@v3.3.0
4545
46- # Note(Bazire): this creates so many failure, deactivating for now.
47- # - name: Cache Python dependencies
48- # uses: actions/cache@v3
49- # with:
50- # path: python-client/.venv
51- # key: ${{ runner.os }}-${{ matrix.python-version }}-client-${{ hashFiles('python-client/pdm.lock')}}
52- # restore-keys: ${{ runner.os }}-client
53-
54- - name : Set up Python
55- uses : actions/setup-python@v4
46+ - name : Setup PDM
47+ uses : pdm-project/setup-pdm@v3
5648 with :
5749 python-version : ${{ matrix.python-version }}
58-
59- - name : Run Python commands
60- run : |
61- python3 -m pip install virtualenv -U --upgrade pip
62- echo "Python ($(which python)) packages:\n $(python -m pip list)"
63-
64- - name : Setup Gradle # To cache ~/.gradle
65- uses : gradle/gradle-build-action@v2
66- with :
67- cache-read-only : false
68-
69- - name : Set up JDK 17 # Needed because of Gradle anyway
70- uses : actions/setup-java@v3
71- with :
72- distribution : temurin
73- java-version : 17
50+ cache : true
51+ cache-dependency-path : ' python-client/pdm.lock'
7452
7553 - name : Set up Pandoc (needed for python-client doc)
7654 uses : r-lib/actions/setup-pandoc@v2
@@ -84,14 +62,27 @@ jobs:
8462 key : ${{ runner.os }}-giskard-test-resources-${{ hashFiles('python-client/tests/fixtures/**/*py')}}
8563 restore-keys : ${{ runner.os }}-giskard-test-resources
8664
87- # - name: Get number of CPU cores
88- # uses: SimenB/github-actions-cpu-cores@v1
89- # id: cpu-cores
65+ - name : Install dependencies
66+ working-directory : python-client
67+ run : pdm install
9068
91- - name : Install, Lint, build, and test all
69+ - name : Lint code
70+ working-directory : python-client
71+ run : pdm lint
72+
73+ - name : Test code
74+ working-directory : python-client
9275 env :
93- PYTEST_XDIST_AUTO_NUM_WORKERS : 1 # Test, to see if there are still OOM error on windows CI
94- run : ./gradlew :python-client:install :python-client:lint :python-client:build :python-client:test :python-client:package --info --parallel
76+ PYTEST_XDIST_AUTO_NUM_WORKERS : 1
77+ run : pdm test-fast
78+
79+ - name : Build
80+ working-directory : python-client
81+ run : pdm build
82+
83+ - name : Package
84+ working-directory : python-client
85+ run : pdm package
9586
9687 - name : " Python client: archive built artifacts"
9788 if : ${{ steps.extract_branch.outputs.branch == 'main' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' }}
0 commit comments