diff --git a/.github/workflows/check.yml b/.github/workflows/lint.yml similarity index 100% rename from .github/workflows/check.yml rename to .github/workflows/lint.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..d6f8d37d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: Test + +on: + pull_request: + paths: ["**.rs", "**.toml", "**.lock"] + push: + branches: [main] + paths: ["**.rs", "**.toml", "**.lock"] + +jobs: + rust: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('./Cargo.lock') }}-test + + - name: cargo test + run: cargo test --all-features