-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dmitry Dygalo <[email protected]>
- Loading branch information
1 parent
e9d1f60
commit feefcc9
Showing
193 changed files
with
5,327 additions
and
5,866 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,30 +17,27 @@ jobs: | |
fetch-depth: 0 | ||
- uses: aevea/[email protected] | ||
|
||
pre-commit: | ||
name: Generic pre-commit checks | ||
msrv: | ||
name: MSRV | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-python@v5 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
python-version: 3.11 | ||
toolchain: "1.65" | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- run: pip install pre-commit | ||
- run: pre-commit run --all-files | ||
working-directory: ./bindings/python | ||
- run: cargo build | ||
|
||
test-stable: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04, macos-12, windows-2022] | ||
draft: [draft201909, draft202012] | ||
|
||
name: Test ${{ matrix.draft }} (stable) on ${{ matrix.os}} | ||
name: Test on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -51,12 +48,10 @@ jobs: | |
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: jsonschema | ||
cache-all-crates: "true" | ||
key: ${{ matrix.os }}-${{ matrix.draft }} | ||
key: ${{ matrix.os }} | ||
|
||
- run: cargo test --no-fail-fast --features ${{ matrix.draft }} | ||
working-directory: ./jsonschema | ||
- run: cargo test --no-fail-fast | ||
|
||
build-wasm32: | ||
strategy: | ||
|
@@ -77,11 +72,9 @@ jobs: | |
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: jsonschema | ||
cache-all-crates: "true" | ||
|
||
- run: cargo build --target ${{ matrix.target }} --no-default-features --features=cli | ||
working-directory: ./jsonschema | ||
- run: cargo build --target ${{ matrix.target }} --no-default-features -p jsonschema | ||
|
||
coverage: | ||
name: Run test coverage | ||
|
@@ -95,19 +88,16 @@ jobs: | |
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: jsonschema | ||
cache-all-crates: "true" | ||
|
||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
|
||
- name: Run tests | ||
run: cargo llvm-cov --no-report --all-features | ||
working-directory: ./jsonschema | ||
|
||
- name: Generate coverage reports | ||
run: cargo llvm-cov report --lcov --output-path lcov.info | ||
working-directory: ./jsonschema | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
|
@@ -117,32 +107,42 @@ jobs: | |
files: lcov.info | ||
fail_ci_if_error: true | ||
|
||
lints-python: | ||
name: Python lints | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: hynek/setup-cached-uv@v2 | ||
|
||
- run: uvx ruff check python tests-py | ||
working-directory: crates/jsonschema-py | ||
|
||
- run: uvx mypy python | ||
working-directory: crates/jsonschema-py | ||
|
||
test-python: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04, macos-12, windows-2022] | ||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
|
||
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
|
||
- run: python -m pip install tox | ||
working-directory: ./bindings/python | ||
|
||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Run ${{ matrix.python }} tox job | ||
run: tox -e py | ||
working-directory: ./bindings/python | ||
- uses: hynek/setup-cached-uv@v2 | ||
|
||
- run: uv python install ${{ matrix.python-version }} | ||
|
||
- run: uvx --with="tox" --with="tox-gh-actions" --with="tox-uv" tox -e py | ||
working-directory: crates/jsonschema-py | ||
|
||
fmt: | ||
name: Rustfmt | ||
|
@@ -155,19 +155,6 @@ jobs: | |
components: rustfmt | ||
|
||
- run: cargo fmt --all -- --check | ||
working-directory: ./jsonschema | ||
|
||
- run: cargo fmt --all -- --check | ||
working-directory: ./bindings/python | ||
|
||
- run: cargo fmt --all -- --check | ||
working-directory: ./bench_helpers | ||
|
||
- run: cargo fmt --all -- --check | ||
working-directory: ./perf-helpers | ||
|
||
- run: cargo fmt --all -- --check | ||
working-directory: ./jsonschema-test-suite | ||
|
||
clippy: | ||
name: Clippy | ||
|
@@ -182,16 +169,8 @@ jobs: | |
components: clippy | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: | | ||
jsonschema | ||
bindings/python | ||
|
||
- run: cargo clippy --all-targets --all-features -- -D warnings | ||
working-directory: ./jsonschema | ||
|
||
- run: cargo clippy --all-targets --all-features -- -D warnings | ||
working-directory: ./bindings/python | ||
|
||
features: | ||
name: Check features | ||
|
@@ -204,11 +183,7 @@ jobs: | |
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: jsonschema | ||
cache-all-crates: "true" | ||
|
||
- uses: taiki-e/install-action@cargo-hack | ||
|
||
- run: cargo hack check --feature-powerset --lib | ||
working-directory: ./jsonschema | ||
- run: cargo hack check --feature-powerset |
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
Oops, something went wrong.