Skip to content

Commit

Permalink
[workflow] Use pdm to manage dependencies (#5924)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3f729b0)
  • Loading branch information
haiiliin authored and mergify[bot] committed Jan 17, 2025
1 parent 3cf6289 commit c54dd90
Show file tree
Hide file tree
Showing 7 changed files with 3,554 additions and 13 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,24 @@ jobs:
PUBLISH: ${{ needs.branch.outputs.publish }}

steps:
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.11"
cache: true
- name: Installing the library
run: |
pip install .[docs]
pip install git+https://github.com/haiiliin/sphinx-immaterial.git
pip show abqpy
pdm install --group docs
pdm run python -m ensurepip
pdm run python -m pip install git+https://github.com/haiiliin/sphinx-immaterial.git
pdm run python -m pip show abqpy
- name: Build the documentation
run: |
cd docs && make ${{ matrix.builder }}
cd docs && pdm run make ${{ matrix.builder }}
env:
SPHINXOPTS: -j auto
- name: Upload artifacts
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ jobs:
3.12
3.13
allow-prereleases: true
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox coveralls
pip install tox tox-pdm coveralls
- name: Test with tox
run: tox
env:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ jobs:
ref: ${{ matrix.version }}
fetch-depth: 0
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v5
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: 3.11
python-version: "3.11"
cache: true
- name: Install dependencies
run: pip install .[dev,docs]
run: |
pdm install --group dev,docs
- name: Update submodules
run: |
git pull --recurse-submodules
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,6 @@ docs/source/locales/

# test files
test-report.xml

# pdm
.pdm-python
Loading

0 comments on commit c54dd90

Please sign in to comment.