-
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
102d2a7
commit fd309b3
Showing
9 changed files
with
224 additions
and
8 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 |
---|---|---|
|
@@ -2,9 +2,35 @@ | |
name: CI | ||
on: push | ||
jobs: | ||
pre-commit: | ||
precommit: | ||
name: Pre-commit 🔥 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/[email protected] | ||
|
||
run: | ||
name: "tests & coverage 💊" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install hatch | ||
run: | | ||
python -m pip install hatch | ||
- name: Lint | ||
run: hatch run check | ||
|
||
- name: Tests | ||
run: hatch run +py=${{ matrix.python-version }} test:test | ||
|
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,76 @@ | ||
name: Coverage | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
release: | ||
types: | ||
- published | ||
schedule: | ||
# At 12:00 on every day-of-month | ||
- cron: "0 12 */1 * *" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Set up dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -qy \ | ||
pkg-config \ | ||
libdebuginfod-dev \ | ||
libunwind-dev \ | ||
liblz4-dev \ | ||
gdb \ | ||
lcov \ | ||
libdw-dev \ | ||
libelf-dev \ | ||
python3.10-dev \ | ||
python3.10-dbg | ||
- name: Install Python dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip cython pkgconfig | ||
make test-install | ||
- name: Disable ptrace security restrictions | ||
run: | | ||
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope | ||
- name: Add ./node_modules/.bin to PATH | ||
run: | | ||
export PATH="./node_modules/.bin:$PATH" | ||
- name: Compute C++ coverage | ||
run: | | ||
make ccoverage | ||
- name: Compute Python + Cython coverage | ||
run: | | ||
make pycoverage | ||
- name: Upload C++ report to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: cppcoverage.lcov | ||
flags: cpp | ||
- name: Upload {P,C}ython report to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: pycoverage.lcov | ||
flags: python_and_cython |
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,22 @@ | ||
|
||
towncrier-check: | ||
name: Verify Towncrier entry added | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Towncrier | ||
run: | | ||
python -m pip install towncrier | ||
- name: Verify Towncrier entry added | ||
if: github.event_name == 'pull_request' | ||
env: | ||
BASE_BRANCH: ${{ github.base_ref }} | ||
run: | | ||
# Fetch the pull request' base branch so towncrier will be able to | ||
# compare the current branch with the base branch. | ||
# Source: https://github.com/actions/checkout/#fetch-all-branches. | ||
git fetch --no-tags origin +refs/heads/${BASE_BRANCH}:refs/remotes/origin/${BASE_BRANCH} | ||
towncrier check --compare-with origin/${BASE_BRANCH} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Change Log | ||
********** | ||
|
||
.. towncrier release notes start | ||
Version 0.0.1 (July 13, 2024) | ||
++++++++++++++++++++++++++++++ |
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