Skip to content

Commit

Permalink
ci: 👷 cache for poetry added
Browse files Browse the repository at this point in the history
Signed-off-by: Onuralp SEZER <thunderbirdtr@fedoraproject.org>
  • Loading branch information
onuralpszr committed Sep 24, 2023
1 parent ba3a32c commit 001f95c
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,33 @@ jobs:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install poetry for Python ${{ matrix.python-version }}
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'

- name: Setup an environment for Python ${{ matrix.python-version }}
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade poetry
poetry config virtualenvs.create false
poetry install
run: poetry install

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test
run: |
kfk
cd tests && python -m pytest
poetry run kfk
cd tests && poetry run pytest
- name: Build
run: |
python -m build
twine check --strict dist/*
poetry run python -m build
poetry run twine check --strict dist/*

0 comments on commit 001f95c

Please sign in to comment.