11name : CI/CD
22on :
33 push :
4+ branches :
5+ - main
46 pull_request :
57 workflow_dispatch :
68 schedule : [{cron: '1 0 * * 6'}]
79env :
810 DOCKER_BUILDKIT : " 1"
911 COMPOSE_DOCKER_CLI_BUILD : " 1"
1012 BUILDKIT_PROGRESS : " plain"
11- RELEASABLE_REPOS : " ^kiorky/ "
13+ RELEASABLE_REPOS : " ^pallets-eco/croniter "
1214 RELEASABLE_BRANCHES : " ^(refs/heads/)?(master|main|new-packaging)$"
15+ FORCE_COLOR : " true"
1316jobs :
1417 test-code-QA :
1518 runs-on : ubuntu-latest
@@ -23,14 +26,19 @@ jobs:
2326 uses : actions/cache@v4
2427 with :
2528 path : .tox
26- key : ${{ runner.os }}-${{ matrix.python }}-toxQA
27- - name : Set up Python ${{ matrix.python-version }}
28- uses : actions/setup-python@v5
29- with : {python-version: "${{ matrix.python-version }}", cache: pip, cache-dependency-path: 'requirements/*.txt'}
30- - name : install tests dependencies
31- run : pip install -r requirements/test.txt -r requirements/lint.txt -r requirements/mypy.txt -r requirements/tox.txt -r requirements/format.txt
29+ key : test-code-QA-${{ runner.os }}-${{ matrix.python }}-toxQA-${{ hashFiles('**/pyproject.toml') }}
30+ - name : Cache uv
31+ uses : actions/cache@v4
32+ with :
33+ path : ~/.cache/uv
34+ key : test-code-QA-${{ runner.os }}-${{ matrix.python }}-uvQA-${{ hashFiles('**/pyproject.toml') }}
35+ - name : Install uv and tox
36+ shell : sh
37+ run : |
38+ curl -LsSf https://astral.sh/uv/install.sh | sh
39+ uv tool install tox
3240 - name : formatters check
33- run : tox --current-env - e lint,mypy,fmt
41+ run : tox -e lint,mypy,fmt
3442
3543 test-py3 :
3644 runs-on : ubuntu-latest
@@ -44,26 +52,26 @@ jobs:
4452 uses : actions/cache@v4
4553 with :
4654 path : .tox
47- key : ${{ runner.os }}-${{ matrix.python }}-tox
48- - name : Set up Python ${{ matrix.python-version }}
49- uses : actions/setup-python@v5
50- with : {python-version: "${{ matrix.python-version }}", cache: pip, cache-dependency-path: 'requirements/*.txt'}
51- - name : install tests dependencies
52- run : pip install -r requirements/test.txt -r requirements/tox.txt
55+ key : test-py3-${{ runner.os }}-${{ matrix.python }}-tox-${{ hashFiles('**/pyproject.toml') }}
56+ - name : Cache uv
57+ uses : actions/cache@v4
58+ with :
59+ path : ~/.cache/uv
60+ key : test-py3-${{ runner.os }}-${{ matrix.python }}-uvQA-${{ hashFiles('**/pyproject.toml') }}
61+ - name : Install uv and tox
62+ shell : sh
63+ run : |
64+ curl -LsSf https://astral.sh/uv/install.sh | sh
65+ uv tool install tox
5366 - name : run tests with coverage
54- run : tox --current-env - e cov
67+ run : tox -e cov
5568
5669 test-32bits :
5770 runs-on : ubuntu-latest
5871 steps :
5972 - uses : actions/checkout@v3
60- - name : Cache tox environments
61- uses : actions/cache@v4
62- with :
63- path : .dockertox
64- key : ${{ runner.os }}-${{ matrix.python }}-dockertox
6573 - name : Test with pytest
6674 run : |
67- docker compose build --build-arg BASE=corpusops/croniter:32bits
68- docker compose run --rm app tox --current- env -e test
69- env : { COMPOSE_FILE: "docker-compose.yml:docker-compose-32bits.yml"}
75+ docker compose run --build --rm --env FORCE_COLOR=true --env UV_LINK_MODE=copy app tox -e test
76+ env :
77+ COMPOSE_FILE : " docker-compose.yml:docker-compose-build.yml:docker-compose- 32bits.yml"
0 commit comments