From 6533017546d5433e7848c93b93c29eee6b9713b4 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Thu, 30 May 2024 07:21:25 -0600 Subject: [PATCH] ci: refactor --- .github/dependabot.yml | 4 ++ .github/workflows/continuous-integration.yml | 54 ++++++++++++++++---- 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 53f8242a..d062b443 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,9 @@ version: 2 updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" - package-ecosystem: "cargo" directory: "/" schedule: diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index da420d80..921c865b 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -1,26 +1,58 @@ -name: Continuous Integration +name: Continuous integration on: push: - branches: [main] + branches: + - main pull_request: - branches: [main] env: CARGO_TERM_COLOR: always + CARGO_TERM_VERBOSE: true jobs: - build: - runs-on: ubuntu-latest + test: strategy: matrix: - features: ["", "--features laz", "--features laz-parallel"] + features: + - "" + - "--features laz" + - "--features laz-parallel" + os: + - macos-latest + - ubuntu-latest + - windows-latest + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: Swatinem/rust-cache@v2 + - name: Test + run: cargo test ${{ matrix.features }} + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: Swatinem/rust-cache@v2 + - name: Install Rust nightly + run: | + rustup update --no-self-update nightly + rustup component add --toolchain nightly rustfmt + rustup default nightly + - name: Format + run: cargo fmt --check + clippy: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: Swatinem/rust-cache@v2 - - name: Build - run: cargo build --verbose ${{ matrix.features }} - name: Clippy - run: cargo clippy --verbose ${{ matrix.features }} - - name: Run tests - run: cargo test --verbose ${{ matrix.features }} + run: cargo clippy --all-features + doc: + runs-on: ubuntu-latest + env: + RUSTDOCFLAGS: -Dwarnings + steps: + - uses: actions/checkout@v2 + - uses: Swatinem/rust-cache@v2 + - name: Doc + run: cargo doc --all-features \ No newline at end of file