commit: 832171d1aad13dee4b9176c469bd579549502409
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 13 21:34:24 2022 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 19 16:49:37 2022 +0000
URL:
https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=832171d1
ci: update workflows
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
.github/workflows/doc.yml | 6 ++----
.github/workflows/release.yml | 25 +++++++++----------------
.github/workflows/test.yml | 13 +++++--------
3 files changed, 16 insertions(+), 28 deletions(-)
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index a6552fec..b8a0101e 100644
--- a/.github/workflows/doc.yml
+++ b/.github/workflows/doc.yml
@@ -25,17 +25,15 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.10'
- cache: 'pip'
- cache-dependency-path: requirements/*.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install -r requirements/dev.txt -r requirements/docs.txt
+ pip install ".[doc]"
- name: Build sphinx documentation
run: |
- python setup.py build_docs
+ make html
# notify github this isn't a jekyll site
touch build/sphinx/html/.nojekyll
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3bb70cb1..4ffd6f50 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -4,6 +4,7 @@ on:
push:
branches: [deploy]
tags: [v*]
+ workflow_dispatch:
jobs:
build-sdist:
@@ -19,22 +20,19 @@ jobs:
- name: Install dependencies
run: |
- # install deps required for building sdist/wheels
python -m pip install --upgrade pip
- pip install -r requirements/dist.txt -r requirements/test.txt
+ pip install build ".[test,doc]"
- name: Test with pytest
env:
PY_COLORS: 1 # forcibly enable pytest colors
- run: python setup.py test
+ run: pytest
- name: Build sdist
run: |
git clean -fxd
- # build sdist
- python setup.py sdist
- # run in-place build so wheel deps use release versions
- python setup.py build_py -i
+ make man
+ make sdist
- name: Output dist file info
run: |
@@ -49,10 +47,6 @@ jobs:
build-wheel:
runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- pyver: [cp39, cp310, cp311]
steps:
- name: Checkout code
uses: actions/checkout@v3
@@ -62,13 +56,12 @@ jobs:
with:
output-dir: dist
env:
- CIBW_BUILD: ${{matrix.pyver}}-*
+ CIBW_BUILD: cp310-*
CIBW_ARCHS_LINUX: x86_64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_24
- CIBW_BEFORE_BUILD: pip install -r {project}/requirements/dist.txt &&
{project}/.github/workflows/manylinux.sh
- CIBW_BEFORE_TEST: pip install -r {project}/requirements/test.txt
- CIBW_ENVIRONMENT: PY_COLORS=1
- CIBW_TEST_COMMAND: pytest -v {project}/tests
+ CIBW_BEFORE_BUILD: "{project}/.github/workflows/manylinux.sh && pip
install '{project}'"
+ CIBW_BEFORE_TEST: pip install '{project}[test]'
+ CIBW_TEST_COMMAND: pytest {project}/tests
- name: Upload wheel artifacts
uses: actions/upload-artifact@v3
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 5af0c3a3..6659a14c 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -66,9 +66,7 @@ jobs:
- name: Pin dependencies to minimal versions
if: ${{ matrix.deps == 'minimal-deps' }}
- run: |
- sed -i -e 's:~=:==:' requirements/*
- mv requirements/install.txt requirements/dev.txt
+ run: sed -e '/^requires-python/!s/~=/==/' -i pyproject.toml
# To use libtree-sitter-bash.so installed on the system, we need to compile
# it manually, because ubuntu doesn't yet package (but Gentoo does)
@@ -92,13 +90,12 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- cache-dependency-path: requirements/*.txt
+ cache-dependency-path: pyproject.toml
- - name: Install python deps
+ - name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install -r requirements/test.txt -r requirements/ci.txt
- pip install .
+ pip install ".[test]"
- name: Test with pytest
env:
@@ -136,7 +133,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install -r requirements/dev.txt pylint
+ pip install . pylint
- name: Run linting tools
run: |