-
-
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
fcf7796
commit f0fc7c9
Showing
7 changed files
with
239 additions
and
3 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,36 @@ | ||
version: 2 | ||
updates: | ||
- directory: / | ||
package-ecosystem: pip | ||
schedule: | ||
interval: weekly | ||
timezone: America/Mexico_City | ||
assignees: | ||
- "edgarrmondragon" | ||
reviewers: | ||
- "edgarrmondragon" | ||
commit-message: | ||
prefix: "chore(deps): " | ||
prefix-development: "chore(deps-dev): " | ||
- package-ecosystem: pip | ||
directory: /.github/workflows | ||
schedule: | ||
interval: monthly | ||
timezone: America/Mexico_City | ||
assignees: | ||
- "edgarrmondragon" | ||
reviewers: | ||
- "edgarrmondragon" | ||
commit-message: | ||
prefix: "ci: " | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
timezone: America/Mexico_City | ||
assignees: | ||
- "edgarrmondragon" | ||
reviewers: | ||
- "edgarrmondragon" | ||
commit-message: | ||
prefix: "ci: " |
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,2 @@ | ||
enabled: true | ||
titleOnly: true |
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 @@ | ||
hatch==1.7.0 |
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,51 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
env: | ||
PIP_CONSTRAINT: .github/workflows/constraints.txt | ||
run: | | ||
pipx install hatch | ||
- name: Build | ||
run: | | ||
hatch build | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
upload: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
environment: publish | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: Upload wheel to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: dist/*.whl | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true | ||
|
||
- name: Publish | ||
uses: pypa/[email protected] |
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,135 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- src/** | ||
- tests/** | ||
- pyproject.toml | ||
- .github/workflows/test.yml | ||
- .github/workflows/constraints.txt | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- src/** | ||
- tests/** | ||
- pyproject.toml | ||
- .github/workflows/test.yml | ||
- .github/workflows/constraints.txt | ||
workflow_dispatch: {} | ||
schedule: | ||
# Run every 27 hours to avoid running at the same time every day | ||
- cron: "40 12 * * 1-5" | ||
|
||
concurrency: | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
cache: pip | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
env: | ||
PIP_CONSTRAINT: .github/workflows/constraints.txt | ||
run: | | ||
pipx install hatch | ||
- name: Run lint | ||
env: | ||
HATCH_ENV: lint | ||
run: | | ||
hatch run style | ||
typing: | ||
name: Typing | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
cache: pip | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
env: | ||
PIP_CONSTRAINT: .github/workflows/constraints.txt | ||
run: | | ||
pipx install hatch | ||
- name: Run typing | ||
env: | ||
HATCH_ENV: lint | ||
run: | | ||
hatch run typing | ||
test: | ||
name: Pytest (Python ${{ matrix.python-version }}, ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
include: | ||
- python-version: "3.11" | ||
os: "windows-latest" | ||
|
||
- python-version: "3.11" | ||
os: "macos-latest" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
cache: pip | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
- name: Install dependencies | ||
env: | ||
PIP_CONSTRAINT: .github/workflows/constraints.txt | ||
run: | | ||
pipx install hatch | ||
- name: Run tests | ||
env: | ||
HATCH_ENV: "test.py${{ matrix.python-version }}" | ||
run: | | ||
hatch run cov | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-data | ||
path: ".coverage.*" | ||
|
||
coverage: | ||
name: Coverage | ||
runs-on: ubuntu-latest | ||
needs: test | ||
env: | ||
PYTHON: "3.11" | ||
HATCH_ENV: coverage | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON }} | ||
- name: Install dependencies | ||
env: | ||
PIP_CONSTRAINT: .github/workflows/constraints.txt | ||
run: | | ||
pipx install hatch | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: coverage-data | ||
- name: Combine coverage data | ||
run: | | ||
hatch run report | ||
- name: Create coverage XML report | ||
run: | | ||
hatch run xml | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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