build(deps): bump serde_json from 1.0.137 to 1.0.138 (#372) #893
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
name: Rust | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
tags: ["v*.*.*"] | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check | |
run: cargo check --all-features | |
test: | |
name: Test | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run unit tests with vendored protoc | |
run: cargo test --all-features # Uses vendored protoc; not compatible with windows | |
if: ${{ matrix.os != 'windows-latest' }} | |
- uses: arduino/setup-protoc@v3 # Download and 'install' protoc | |
with: | |
version: "28.3" | |
# avoid rate-limiting | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run unit tests with system protoc | |
run: cargo test | |
if: ${{ matrix.os != 'windows-latest' }} | |
- name: Install test runner dependencies | |
run: python3 -m pip install --upgrade pip protobuf pyyaml click | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- name: Run validation tests | |
# No need to run validation tests for all operating systems, and Linux | |
# runners are the fastest of the bunch. | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
working-directory: tests | |
run: python3 runner.py run --no-html | |
style: | |
name: Style | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Rustfmt | |
run: cargo fmt --all -- --check | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Clippy | |
run: cargo clippy --all-features -- -D warnings | |
doc: | |
name: Doc | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Doc | |
run: RUSTDOCFLAGS="-Dwarnings" cargo doc --workspace --all-features | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: "startsWith(github.ref, 'refs/tags/')" | |
needs: [check, test] | |
environment: VALIDATOR_RELEASE | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Fetch Substrait submodule tags | |
working-directory: substrait | |
run: | | |
git fetch --recurse-submodules=no origin +refs/tags/*:refs/tags/* | |
git describe --dirty --tags | |
- name: Local build to populate resource files | |
working-directory: rs | |
run: cargo build --features protoc | |
- name: Publish substrait-validator-derive | |
working-directory: derive | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
run: cargo publish --allow-dirty | |
- name: Publish substrait-validator | |
working-directory: rs | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
run: cargo publish --allow-dirty --features protoc |