-
Notifications
You must be signed in to change notification settings - Fork 2
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
eb51db9
commit 122d8e0
Showing
7 changed files
with
135 additions
and
84 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 |
---|---|---|
@@ -1,55 +1,13 @@ | ||
name: Commit | ||
name: Commit Unit Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags-ignore: | ||
- v[0-9].[0-9]+.[0-9]+ | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
# Rust Tests | ||
test-rust: | ||
runs-on: ubuntu-latest | ||
env: | ||
CARGO_TERM_COLOR: always | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust | ||
run: rustup update nightly | ||
- run: rustup default nightly | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: Generate code coverage | ||
run: cargo llvm-cov --workspace --lcov --output-path lcov.info --features ci | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: lcov.info | ||
fail_ci_if_error: true | ||
|
||
# Python Binding Tests | ||
test-python: | ||
runs-on: ${{ matrix.os }} | ||
needs: test-rust | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] | ||
steps: | ||
# TODO: Remove this when the nightly BTreeCursor is stabilized and released | ||
- name: Install Rust | ||
run: rustup update nightly | ||
- run: rustup default nightly | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: python -m pip install --upgrade pip | ||
- name: Install package | ||
run: python -m pip install '.[dev]' | ||
- name: Run Tests | ||
run: pytest | ||
test-rust: | ||
uses: ./.github/workflows/test_rust.yml | ||
test-python: | ||
uses: ./.github/workflows/test_python.yml | ||
needs: [ test-rust ] |
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,10 @@ | ||
name: Publish Document Update | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- docs/** | ||
jobs: | ||
update-docs: | ||
uses: ./.github/workflows/update_docs.yml |
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,43 @@ | ||
name: Publish Version Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v[0-9].[0-9]+.[0-9]+ | ||
|
||
jobs: | ||
test-rust: | ||
uses: ./.github/workflows/test_rust.yml | ||
test-python: | ||
uses: ./.github/workflows/test_python.yml | ||
needs: [ test-rust ] | ||
update-docs: | ||
uses: ./.github/workflows/update_docs.yml | ||
needs: [ test-python ] | ||
|
||
release-rust: | ||
runs-on: ubuntu-latest | ||
needs: [ update-docs ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust | ||
run: rustup update nightly | ||
- run: rustup default nightly | ||
- name: Publish to crates.io | ||
run: cargo publish --token ${{ secrets.CRATES_TOKEN }} | ||
|
||
release-python: | ||
runs-on: ${{ matrix.os }} | ||
needs: [ update-docs ] | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install maturin |
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 @@ | ||
name: Test Python | ||
on: [ workflow_call ] | ||
jobs: | ||
test-python: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] | ||
steps: | ||
# TODO: Remove this when the nightly BTreeCursor is stabilized and released | ||
- name: Install Rust | ||
run: rustup update nightly | ||
- run: rustup default nightly | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: python -m pip install --upgrade pip | ||
- name: Install package | ||
run: python -m pip install '.[dev]' | ||
- name: Run Tests | ||
run: pytest |
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 @@ | ||
name: Test Rust | ||
on: [ workflow_call ] | ||
jobs: | ||
test-rust: | ||
runs-on: ubuntu-latest | ||
env: | ||
CARGO_TERM_COLOR: always | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust | ||
run: rustup update nightly | ||
- run: rustup default nightly | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: Generate code coverage | ||
run: cargo llvm-cov --workspace --lcov --output-path lcov.info --features ci | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: lcov.info | ||
fail_ci_if_error: 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
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