Skip to content

Commit

Permalink
build(deps-dev): add build, twine, etc. to dev dependency group
Browse files Browse the repository at this point in the history
  • Loading branch information
afuetterer committed Dec 6, 2023
1 parent 9a18d05 commit 98d400b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
with:
python-version: "3.12"
cache: pip
- run: python -m pip install --upgrade pip setuptools wheel
- run: python -m pip install -e .[dev]
- run: python -m pip install --upgrade pip
- run: python -m pip install --editable .[dev]
- name: Set up pre-commit cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -65,16 +65,16 @@ jobs:
run: |
sudo apt update
sudo apt install --yes pandoc texlive-xetex librsvg2-bin
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade pip
pandoc --version
- name: Install rdmo[mysql] and start mysql
run: |
python -m pip install -e .[ci,mysql]
python -m pip install --editable .[ci,mysql]
sudo systemctl start mysql.service
if: matrix.db-backend == 'mysql'
- name: Install rdmo[postgres] and start postgresql
run: |
python -m pip install -e .[ci,postgres]
python -m pip install --editable .[ci,postgres]
sudo systemctl start postgresql.service
pg_isready
sudo -u postgres psql --command="CREATE USER postgres_user PASSWORD 'postgres_password' CREATEDB"
Expand Down Expand Up @@ -159,13 +159,15 @@ jobs:
with:
python-version: '3.12'
cache: pip
- run: python -m pip install --upgrade build pip setuptools twine wheel
- run: |
python -m pip install --upgrade pip
python -m pip install .[dev]
- name: Build the wheel
run: python -m build --wheel
- name: Check metadata
run: python -m twine check --strict dist/*
- name: Install package from built wheel
run: python -m pip install dist/rdmo*.whl
run: python -m pip install --force-reinstall dist/rdmo*.whl
- name: Write info to step summary
run: |
echo -e "# ✓ Wheel successfully built (v${{ steps.new-version.outputs.new_version }})\n\n" >> $GITHUB_STEP_SUMMARY
Expand Down Expand Up @@ -194,7 +196,7 @@ jobs:
with:
python-version: "3.12"
cache: pip
- run: python -Im pip install -e .[dev]
- run: python -Im pip install --editable .[dev]
- run: python -Ic 'import rdmo; print(rdmo.__version__)'

optional-dependencies:
Expand All @@ -210,7 +212,7 @@ jobs:
run: |
sudo apt update
sudo apt install --yes libldap2-dev libsasl2-dev
- run: python -m pip install --upgrade pip pipdeptree setuptools
- run: python -m pip install --upgrade pip
- run: python -m pip install .[allauth,shibboleth,ci,dev,gunicorn,ldap,mysql,postgres,pytest]
- name: Write info to step summary
run: |
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ ci = [
"rdmo[dev]",
]
dev = [
"build~=1.0",
"pipdeptree~=2.13",
"pre-commit~=3.4",
"setuptools~=69.0",
"twine~=4.0",
"wheel~=0.42.0",
"rdmo[allauth]",
"rdmo[pytest]",
]
Expand Down

0 comments on commit 98d400b

Please sign in to comment.