Add basic tests #7
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: | |
- master | |
pull_request: | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the repository | |
- uses: actions/checkout@v3 | |
# Set up the Rust toolchain | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
components: rustfmt, clippy | |
# Run cargo check | |
- name: Run cargo check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
# Install cargo-binstall | |
- name: Install cargo-binstall | |
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash | |
# Use cargo-binstall to install cargo-semver-checks | |
- name: Install cargo-semver-checks | |
run: cargo binstall cargo-semver-checks --no-confirm | |
# Check for proper formatting | |
- name: Check formatting | |
run: cargo fmt -- --check | |
# Run tests | |
- name: Run tests | |
run: cargo test --all | |
# Check semver compliance | |
- name: Check Semver Compliance | |
run: cargo semver-checks check-release |