Skip to content

Commit

Permalink
dev only with latest Python version
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Johnson <najohnsn@us.ibm.com>
  • Loading branch information
najohnsn committed Aug 6, 2024
1 parent 6713e31 commit 7038dc5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mkdocs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
python-version: 3.12
- run: pip install --disable-pip-version-check -r requirements.txt
- run: mkdocs gh-deploy --force
57 changes: 30 additions & 27 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,29 @@ name: CI/CD
on: push

jobs:
CI:
build-wheel:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12

- run: pip install --disable-pip-version-check -r requirements.txt
- run: pycodestyle tnz/*.py
- run: python -m build --wheel --outdir dist/
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

test-wheel:
needs: build-wheel
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ]

steps:
- uses: actions/checkout@v4
Expand All @@ -16,39 +34,24 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install --disable-pip-version-check -r requirements.txt
- run: pip install --disable-pip-version-check -r requirements.txt
- uses: actions/download-artifact@v4
- run: pip install $(dist/*.whl)
- run: pytest

- name: Lint
run: |
pycodestyle tnz/*.py
- name: Install tnz
run: |
pip install .
- name: Run tests
run: |
pytest
CD:
deploy-pypi:
if: startsWith(github.ref, 'refs/tags')
needs: CI
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install dependencies
run: |
pip install --disable-pip-version-check -r requirements.txt
- name: Build dist
run: |
python -m build --wheel --outdir dist/
- run: pip install --disable-pip-version-check -r requirements.txt
- uses: actions/download-artifact@v4
- name: Publish
env:
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
16 changes: 7 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
black==24.4.2; python_version>="3.8"
black==24.4.2
build==1.0.3
ebcdic==1.1.1; sys_platform!="zos"
mkdocs-material==9.5.31; python_version>="3.8"
mkdocs-minify-plugin==0.8.0; python_version>="3.8"
mkdocstrings-python==1.10.5; python_version>="3.8"
pycodestyle==2.10.0; python_version<"3.8"
pycodestyle==2.12.0; python_version>="3.8"
mkdocs-material==9.5.31
mkdocs-minify-plugin==0.8.0
mkdocstrings-python==1.10.5
pycodestyle==2.12.0
pylint==2.17.5
pytest==8.3.2; python_version>="3.8"
pytest>=7.4.2; python_version<"3.8"
twine==5.1.1; sys_platform!="zos" and python_version>="3.8"
pytest==8.3.2
twine==5.1.1; sys_platform!="zos"
wheel==0.41.2

0 comments on commit 7038dc5

Please sign in to comment.