Sort on disk #147
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: Continuous Integration | |
on: | |
workflow_dispatch: | |
push: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Rust ${{ matrix.rust }} | |
runs-on: ubuntu-latest | |
outputs: | |
passed_rustfmt: ${{ steps.rustfmt.outputs.passed_rustfmt }} | |
passed_clippy: ${{ steps.clippy.outputs.passed_clippy }} | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [1.65.0, stable] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt, clippy | |
- id: install-wasm-pack | |
name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | bash | |
- id: pin_dependencies | |
name: Pin dependencies | |
if: ${{ matrix.rust == '1.65.0' }} | |
run: | | |
./scripts/msrv_pin_dependencies.sh | |
- id: rustfmt | |
name: Rust format | |
if: ${{ matrix.rust == 'stable' }} | |
run: | | |
cargo fmt --verbose --all -- --check | |
echo "passed_rustfmt=${{ matrix.rust }}" >> "$GITHUB_OUTPUT" | |
- id: clippy | |
name: Clippy | |
if: ${{ matrix.rust == '1.65.0' }} | |
run: | | |
cargo clippy --all --all-features --all-targets -- -D warnings | |
echo "passed_clippy=${{ matrix.rust }}" >> "$GITHUB_OUTPUT" | |
- id: test | |
name: Compile and run tests | |
run: cargo test --all-features --verbose | |
- id: wasm-build | |
name: Compile WASM modules | |
run: cd datapet_codegen_wasm && wasm-pack build | |
code-checks: | |
name: Code checks | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Rustfmt | |
run: | | |
echo "Rustfmt run on ${{ needs.test.outputs.passed_rustfmt }}" >> "$GITHUB_STEP_SUMMARY" | |
test "${{ needs.test.outputs.passed_rustfmt }}" = "stable" | |
- name: Clippy | |
run: | | |
echo "Clippy run on ${{ needs.test.outputs.passed_clippy }}" >> "$GITHUB_STEP_SUMMARY" | |
test "${{ needs.test.outputs.passed_clippy }}" = "1.65.0" |