From 192fd7d4ddca2d17b6b660e574c5827bb29da1ea Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Wed, 25 May 2022 18:53:08 -0400 Subject: [PATCH] New and improved CI pipeline --- .github/workflows/ci.yml | 46 +++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93048409..30110fa3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,37 +3,53 @@ name: CI on: push: branches: - - master + - main pull_request: branches: - - master + - main jobs: build: - + name: Build and Test runs-on: ubuntu-latest strategy: matrix: - rust_version: [stable, "1.55.0"] + rust_version: [stable, 1.55.0] steps: - - uses: actions/checkout@v1 - with: - submodules: true + - uses: actions/checkout@v3 - - name: Setup Rust toolchain - run: rustup default ${{ matrix.rust_version }} + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust_version }} + override: true + profile: minimal - name: Build run: cargo build --locked --verbose - - name: Run tests + - name: Test run: cargo test --locked --verbose - - name: Rustfmt and Clippy - run: | - cargo fmt -- --check - cargo clippy - if: matrix.rust_version == 'stable' \ No newline at end of file + lint: + name: Rustfmt and Clippy + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + + - name: Rustfmt + run: cargo fmt -- --check + + - name: Clippy + run: cargo clippy \ No newline at end of file