Skip to content

Commit

Permalink
enhance ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kiorky committed Oct 31, 2024
1 parent e106a6f commit c225319
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,27 @@ jobs:
venv2/bin/python2 -m pip install pytest -r <(grep -v pytest ./requirements/base.txt)
venv2/bin/pytest src
test-code-QA:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v4
- name: Cache tox environments
uses: actions/cache@v4
with:
path: .tox
key: ${{ runner.os }}-${{ matrix.python }}-toxQA
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with: {python-version: "${{ matrix.python-version }}", cache: pip, cache-dependency-path: 'requirements/*.txt'}
- name: install tests dependencies
run: pip install -r requirements/test.txt -r requirements/lint.txt -r requirements/tox.txt -r requirements/format.txt
- name: formatters check
run: tox --current-env -e lint,fmt

test-py3:
runs-on: ubuntu-latest
strategy:
Expand All @@ -49,9 +70,7 @@ jobs:
uses: actions/setup-python@v5
with: {python-version: "${{ matrix.python-version }}", cache: pip, cache-dependency-path: 'requirements/*.txt'}
- name: install tests dependencies
run: pip install -r requirements/test.txt -r requirements/lint.txt -r requirements/tox.txt
- name: run lint
run: tox --current-env -e lint
run: pip install -r requirements/test.txt -r requirements/tox.txt
- name: run tests with coverage
run: tox --current-env -e cov

Expand All @@ -70,22 +89,3 @@ jobs:
docker compose run --rm app tox --current-env -e test
env: {COMPOSE_FILE: "docker-compose.yml:docker-compose-32bits.yml"}

formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache tox environments
uses: actions/cache@v4
with:
path: .tox
key: ${{ runner.os }}-3.13-tox
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
cache-dependency-path: 'requirements/*.txt'
- name: install format dependencies
run: pip install -r requirements/format.txt -r requirements/tox.txt
- name: run format
run: tox --current-env -e check-format
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ Develop this package
cd croniter
virtualenv --no-site-packages venv3
venv3/bin/pip install --upgrade -r requirements/test.txt -r requirements/lint.txt -r requirements/format.txt -r requirements/tox.txt
venv3/bin/tox --current-env -e lint,test
venv3/bin/black src/
venv3/bin/tox --current-env -e fmt,lint,test


Testing under py2
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ deps = -r{toxinidir}/requirements/lint.txt
changedir = src
commands = flake8 croniter/croniter.py

[testenv:check-format]
[testenv:fmt]
deps = -r{toxinidir}/requirements/format.txt
changedir = src
commands = black --check .

0 comments on commit c225319

Please sign in to comment.