-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
228da93
commit 82fb71b
Showing
2 changed files
with
120 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
# Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.) | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- 'dependencies' | ||
|
||
# Maintain dependencies for PyPI | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- 'dependencies' | ||
|
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,95 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 2 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e .[all] | ||
- name: Lint code | ||
run: | | ||
ruff check . | ||
test: | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install system dependencies | ||
run: sudo apt-get install -y graphviz | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e .[all] | ||
- name: Run tests | ||
run: | | ||
pytest | ||
- name: Coverage report | ||
run: | | ||
coverage xml | ||
coverage report | ||
- name: Upload coverage artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage_${{ matrix.os }}_py-${{ matrix.python-version }} | ||
path: coverage.xml | ||
retention-days: 7 | ||
|
||
coverage: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 2 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download coverage artifacts | ||
uses: actions/download-artifact@v4 | ||
|
||
- name: Codecov upload | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
name: ${{ github.workflow }} | ||
flags: fast-tests | ||
fail_ci_if_error: true | ||
verbose: true | ||
# Token not required for public repos, but avoids upload failure due | ||
# to rate-limiting (but not for PRs opened from forks) | ||
token: ${{ secrets.CODECOV_TOKEN }} |