Fork of https://github.com/oxigraph/oxigraph.git for the purpose of NextGraph project
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
227 lines
6.9 KiB
227 lines
6.9 KiB
name: Change tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
schedule:
|
|
- cron: "0 0 * * 0"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
fmt:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: rustup update && rustup component add rustfmt
|
|
- run: cargo fmt -- --check
|
|
|
|
clippy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- run: rustup update && rustup component add clippy
|
|
- run: cargo clippy
|
|
working-directory: ./lib/oxsdatatypes
|
|
- run: cargo clippy
|
|
working-directory: ./lib/oxrdf
|
|
- run: cargo clippy
|
|
working-directory: ./lib/sparesults
|
|
- run: cargo clippy
|
|
working-directory: ./lib/spargebra
|
|
- run: cargo clippy --all-targets --all-features
|
|
|
|
clippy_msv:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- run: rustup override set 1.60.0 && rustup component add clippy
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
working-directory: ./lib/oxsdatatypes
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
working-directory: ./lib/oxrdf
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
working-directory: ./lib/sparesults
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
working-directory: ./lib/spargebra
|
|
- run: cargo clippy -- -D warnings -D clippy::all
|
|
working-directory: ./server
|
|
|
|
deny:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: EmbarkStudios/cargo-deny-action@v1
|
|
|
|
test_linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- run: rustup update
|
|
- run: cargo test --all-features
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
|
|
address_sanitizer:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- run: rustup update && rustup toolchain install nightly
|
|
- run: cargo +nightly test --tests --target x86_64-unknown-linux-gnu --workspace --exclude pyoxigraph --exclude oxigraph_testsuite --exclude oxigraph_server
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
RUSTFLAGS: -Z sanitizer=address
|
|
|
|
test_windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- run: rustup update
|
|
- run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
|
|
- run: cargo test --all-features
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
|
|
js:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: rustup update
|
|
- run: cargo install wasm-pack
|
|
- run: npm install
|
|
working-directory: ./js
|
|
- run: npm test
|
|
working-directory: ./js
|
|
|
|
python:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- run: rustup update
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.10"
|
|
- run: pip install -r python/requirements.dev.txt
|
|
- run: python -m black --check --diff --color .
|
|
working-directory: ./python
|
|
- run: maturin sdist -m python/Cargo.toml
|
|
- run: pip install target/wheels/*.tar.gz
|
|
- run: python -m unittest
|
|
working-directory: ./python/tests
|
|
- run: sphinx-build -M doctest . build
|
|
working-directory: ./python/docs
|
|
- run: sphinx-build -M html . build
|
|
working-directory: ./python/docs
|
|
- run: python generate_stubs.py pyoxigraph pyoxigraph.pyi --black
|
|
working-directory: ./python
|
|
- run: python -m mypy.stubtest pyoxigraph --allowlist=mypy_allowlist.txt
|
|
working-directory: ./python
|
|
- run: python -m mypy generate_stubs.py tests --strict
|
|
working-directory: ./python
|
|
|
|
python_msv:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- run: rustup update
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.7"
|
|
- run: pip install -r python/requirements.dev.txt
|
|
- run: pip install ./python
|
|
- run: python -m unittest
|
|
working-directory: ./python/tests
|
|
|
|
fuzz_changes:
|
|
if: github.event_name == 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- uses: google/clusterfuzzlite/actions/build_fuzzers@v1
|
|
with:
|
|
language: rust
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
sanitizer: address
|
|
storage-repo: https://${{ secrets.FULL_ACCESS_TOKEN }}@github.com/oxigraph/clusterfuzzlite-oxigraph.git
|
|
- uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
fuzz-seconds: 600
|
|
mode: 'code-change'
|
|
sanitizer: address
|
|
storage-repo: https://${{ secrets.FULL_ACCESS_TOKEN }}@github.com/oxigraph/clusterfuzzlite-oxigraph.git
|
|
|
|
fuzz_repo:
|
|
if: github.event_name != 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- uses: google/clusterfuzzlite/actions/build_fuzzers@v1
|
|
with:
|
|
language: rust
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
sanitizer: address
|
|
- uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
fuzz-seconds: 3600
|
|
mode: 'batch'
|
|
sanitizer: address
|
|
storage-repo: https://${{ secrets.FULL_ACCESS_TOKEN }}@github.com/oxigraph/clusterfuzzlite-oxigraph.git
|
|
|
|
fuzz_prune:
|
|
if: github.event_name != 'pull_request'
|
|
needs: fuzz_repo
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- uses: google/clusterfuzzlite/actions/build_fuzzers@v1
|
|
with:
|
|
language: rust
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
fuzz-seconds: 600
|
|
mode: 'prune'
|
|
storage-repo: https://${{ secrets.FULL_ACCESS_TOKEN }}@github.com/oxigraph/clusterfuzzlite-oxigraph.git
|
|
|
|
fuzz_coverage:
|
|
if: github.event_name != 'pull_request'
|
|
needs: fuzz_prune
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: google/clusterfuzzlite/actions/build_fuzzers@v1
|
|
with:
|
|
language: rust
|
|
sanitizer: coverage
|
|
- uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
fuzz-seconds: 600
|
|
mode: 'coverage'
|
|
sanitizer: 'coverage'
|
|
storage-repo: https://${{ secrets.FULL_ACCESS_TOKEN }}@github.com/oxigraph/clusterfuzzlite-oxigraph.git
|
|
|