Skip to content

updated jsonbourne min version for shellfish #5036

updated jsonbourne min version for shellfish

updated jsonbourne min version for shellfish #5036

Workflow file for this run

name: dgpy-libs-ci
on: [push, pull_request]
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check"
src: "."
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup-python-3
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: install-upgrade-pip
run: |
python -m pip install --upgrade pip
- name: install-ruff
run: |
pip install ruff
- name: ruff-version
run: |
ruff --version
- name: ruff-check
run: |
ruff check .
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check"
src: "."
# TODO: Figure out if we still need isort...
# something is wrong with isort
# - uses: isort/isort-action@master
# with:
# configuration: "--settings-path pyproject.toml --check-only --diff"
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install isort black
- name: check isort & black
run: |
make lint
- name: flake8 & mypy
run: |
pip install nox
nox -s lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: python-sane-setup
run: |
python -m pip install --upgrade pip
- name: setup-poetry
id: setup-poetry
uses: ./.github/actions/setup-poetry
- name: Install dependencies
run: |
poetry install
- name: test-dgpydev
run: |
poetry run pytest --doctest-modules tests
- name: test listless
run: |
cd libs/listless
poetry run pytest --doctest-modules tests listless
- name: test fmts
run: |
cd libs/fmts
poetry run pytest --doctest-modules tests fmts
- name: test xtyping
run: |
cd libs/xtyping
poetry run pytest tests
- name: test funkify
run: |
cd libs/funkify
poetry run pytest --cov=funkify tests
- name: test asyncify
run: |
cd libs/asyncify
poetry run pytest --cov=asyncify tests asyncify --doctest-modules
- name: test requires
run: |
cd libs/requires
poetry run pytest tests
- name: test aiopen
run: |
cd libs/aiopen
poetry run pytest --doctest-modules tests aiopen
- name: test lager
run: |
cd libs/lager
poetry run pytest tests lager
- name: test jsonbourne
run: |
cd libs/jsonbourne
poetry run pytest --doctest-modules tests jsonbourne
- name: test shellfish
run: |
cd libs/shellfish
poetry run pytest --doctest-modules tests shellfish
- name: test dgpylibs
run: |
cd libs/dgpylibs
poetry run pytest --doctest-modules tests dgpylibs
test-jsonbourne:
needs: [lint]
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest nox
- name: Test with pytest
run: |
cd libs/jsonbourne
nox -k test
# - name: list dist files
# run: |
# ${{ matrix.ls || 'ls -lh' }} dist/
# twine check dist/*
# - name: Store dist artifacts
# uses: actions/upload-artifact@v1
# with:
# name: pypi_files
# path: dist
mkdocs:
permissions:
contents: write
deployments: write
needs: [lint, test]
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: setup-poetry
id: setup-poetry
uses: ./.github/actions/setup-poetry
# - name: setup-poetry
# run: |
# curl -sSL https://install.python-poetry.org | python3 -
# which poetry
# poetry config virtualenvs.create false
- name: poetry install
run: |
poetry install
- name: install docs deps
run: poetry run pip install mkdocs-material mkdocs-jupyter mkdocstrings[python] markdown-callouts
- name: mkdocs build
if: github.ref != 'refs/heads/main'
run: poetry run mkdocs build
- name: mkdocs build
if: github.ref == 'refs/heads/main'
run: poetry run mkdocs gh-deploy --force