diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03cee5a8..fb086d10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,90 +11,45 @@ jobs: rust: - stable - beta - - 1.70.0 + - stable minus 8 releases steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal toolchain: ${{ matrix.rust }} - override: true - - uses: actions-rs/cargo@v1 - with: - command: check + - name: check + run: cargo check + - name: check all features + run: cargo check --all-features test: name: Test Suite runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 - test_parser: - name: Test Suite (with parser) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test - args: --features parser -- --nocapture + - name: test + run: cargo test - test_with_tz: - name: Test Suite (with parser) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test - args: --features chrono-tz + - name: test (with parser) + run: cargo test --features parser - fmt: - name: Rustfmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - name: test (with TZ) + run: cargo test --features chrono-tz - clippy: - name: Clippy + fmtclippy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - run: rustup component add clippy - - uses: actions-rs/cargo@v1 + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable with: - command: clippy - args: -- -D warnings + components: clippy, rustfmt + - uses: Swatinem/rust-cache@v2 + + - name: Check + run: cargo clippy --workspace --all-targets --all-features -- -D warnings + + - name: rustfmt + run: cargo fmt --all --check diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3fd8bac2..8a19d905 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -7,7 +7,7 @@ jobs: name: Check Commit Message runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # A PR should not contain too many commits fetch-depth: 10