-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into pre-commit-ci-update-config
- Loading branch information
Showing
38 changed files
with
2,797 additions
and
1,810 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,60 @@ | ||
name: "Run tests with newest dependencies" | ||
name: "Run tests with newest and oldest dependencies" | ||
on: [workflow_dispatch, workflow_call] | ||
|
||
jobs: | ||
run-tests: | ||
name: Run tests 🛠️ on multiple systems 🖥️ and Python 🐍 versions | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
include: | ||
- os: macos-latest | ||
python-version: "3.12" | ||
- os: macos-13 | ||
python-version: "3.12" | ||
- os: windows-latest | ||
python-version: "3.12" | ||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: ${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install pdm | ||
run: pip install pdm | ||
- name: Generate lock with newest dependencies | ||
run: pdm lock --lockfile pdm.newest.lock --strategy no_cross_platform -dG:all | ||
- name: Install quackosm and tests dependencies | ||
run: pdm install --lockfile pdm.newest.lock -dG:all | ||
- name: Run tests with pytest | ||
run: | | ||
pdm run pytest -v -s --durations=20 --doctest-modules --doctest-continue-on-failure quackosm | ||
pdm run pytest -v -s --durations=20 tests/base | ||
pdm run pytest -v -s --durations=20 tests/optional_imports | ||
pdm run pytest -v -s --durations=20 tests/benchmark | ||
run-tests-newest: | ||
name: Run tests 🛠️ on multiple systems 🖥️ and Python 🐍 versions (newest dependencies) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-13, macos-latest, windows-latest] | ||
python-version: ["3.12"] | ||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: ${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install pdm | ||
run: pip install pdm | ||
- name: Generate lock with newest dependencies | ||
run: pdm lock --lockfile pdm.newest.lock --strategy no_cross_platform -dG:all | ||
- name: Install quackosm and tests dependencies | ||
run: pdm install --lockfile pdm.newest.lock -dG:all --skip=post_install | ||
- name: Run tests with pytest | ||
run: | | ||
pdm run pytest -v -s --durations=20 --doctest-modules --doctest-continue-on-failure quackosm | ||
pdm run pytest -v -s --durations=20 tests/base | ||
pdm run pytest -v -s --durations=20 tests/optional_imports | ||
run-tests-oldest: | ||
name: Run tests 🛠️ on multiple systems 🖥️ and Python 🐍 versions (oldest dependencies) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-13, macos-latest, windows-latest] | ||
python-version: ["3.9"] | ||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: ${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install pdm | ||
run: pip install pdm | ||
- name: Generate lock with oldest dependencies | ||
run: pdm lock --lockfile pdm.oldest.lock --strategy no_cross_platform,direct_minimal_versions -dG:all | ||
- name: Install srai and tests dependencies | ||
run: pdm install --lockfile pdm.oldest.lock -dG:all --skip=post_install | ||
- name: Run tests with pytest | ||
run: | | ||
pdm run pytest -v -s --durations=20 tests/base | ||
pdm run pytest -v -s --durations=20 tests/optional_imports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: "Update resources usage plots 📈 and create PR" | ||
on: workflow_dispatch | ||
|
||
env: | ||
PYTHON_VERSION: 3.12 | ||
|
||
jobs: | ||
bump-n-pr: | ||
name: Update resources usage plots 📈 and create PR | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.CICD_PAT_TOKEN }} | ||
- name: Configure Git user | ||
run: | | ||
git config --local user.name "Kraina CI/CD" | ||
git config --local user.email "[email protected]" | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-dev-${{ hashFiles('**/pdm.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-dev- | ||
- name: Install pdm | ||
run: pip install pdm | ||
- name: Generate requirements.txt | ||
run: pdm export --no-default -G docs -G visualization -G cli-dev -f requirements -o requirements.txt | ||
- name: Install dependencies | ||
run: pip install --no-deps -r requirements.txt | ||
- name: Install quackosm | ||
run: | | ||
pdm build -v -d dist | ||
pip install 'quackosm[cli] @ file://'"$(pwd)/$(find dist -name '*.whl')" --user | ||
- name: Execute jupyter notebooks | ||
run: jupyter nbconvert --to notebook --inplace --execute $(find dev/ -type f -name "*.ipynb") --ExecutePreprocessor.kernel_name='python3' | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
title: "chore: update resources usage plots" | ||
branch: update-resources-usage-plots | ||
base: main | ||
labels: Skip-Changelog | ||
add-paths: docs/assets/images/*.png | ||
token: ${{ secrets.CICD_PAT_TOKEN }} | ||
author: Kraina CI/CD <[email protected]> | ||
committer: Kraina CI/CD <[email protected]> | ||
commit-message: "chore: update resources usage plots" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.