chore: Fixed README path in cargo-abi/Cargo.toml file #4
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
msrv-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Sources | |
uses: actions/checkout@v4 | |
- name: Get MSRV | |
run: | | |
RUST_MSRV="$(sed -n 's/rust-version *= *"\(.*\)"/\1/p' near-abi/Cargo.toml)" | |
echo "RUST_MSRV=$RUST_MSRV" >> $GITHUB_ENV | |
- name: "Install ${{ env.RUST_MSRV }} toolchain (MSRV)" | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ env.RUST_MSRV }} | |
default: true | |
- run: cargo check | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Sources | |
uses: actions/checkout@v4 | |
- name: Run Tests | |
run: cargo test | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Sources | |
uses: actions/checkout@v4 | |
- name: Check Formatting | |
run: cargo fmt -- --check | |
- name: Check Clippy | |
run: cargo clippy --tests -- -Dclippy::all | |
check-metaschema: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Sources | |
uses: actions/checkout@v4 | |
- name: Install json-schema-compatibility-checker | |
run: | | |
wget https://github.com/itegulov/json-schema-compatibility-checker/releases/download/v0.1.0/jsonschemacompat_0.1.0_all.deb | |
sudo apt install ./jsonschemacompat_0.1.0_all.deb | |
- name: Generate Current ABI Meta-schema | |
run: cargo run --package metaschema-gen > tmp.json | |
- name: Check that Current Meta-schema is Up-to-date | |
run: diff tmp.json metaschema/near-abi-current-schema.json | |
- name: Check that Meta-schema is Backward Compatible | |
run: pip install semver && python .github/check_metaschema_compatibility.py | |
release-plz: | |
runs-on: ubuntu-latest | |
needs: [msrv-check, tests, lint, check-metaschema] | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.MY_GITHUB_TOKEN }} | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Run release-plz | |
uses: MarcoIeni/release-plz-action@v0.5 | |
env: | |
# https://release-plz.ieni.dev/docs/github/trigger | |
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |