Skip to content

Commit

Permalink
ci: migrate off of actions-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodie committed Nov 22, 2023
1 parent b2ea6df commit 5350170
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 73 deletions.
99 changes: 27 additions & 72 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5350170

Please sign in to comment.