Skip to content

Commit

Permalink
update ci workflows to not use actions-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
mendelt committed Mar 12, 2023
1 parent f91db89 commit 1533de3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 49 deletions.
52 changes: 12 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,49 +12,25 @@ jobs:
name: Rust fmt
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
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --all -- --check

check:
name: A quick check for warnings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: set rust options to fail on warnings
run: echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV
- uses: actions-rs/cargo@v1
with:
command: check
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo clippy --all --all-features -- -D warnings

clippy:
name: Run clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: set rust options to fail on warnings
run: echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV
- uses: actions-rs/cargo@v1
with:
command: clippy
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo clippy --all --all-features -- -D warnings

test:
name: Test
Expand All @@ -66,12 +42,8 @@ jobs:
- beta
- 1.56.0
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1
with:
command: test
- run: cargo test --all --all-features
11 changes: 2 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,7 @@ jobs:
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable

- name: Publish
uses: actions-rs/cargo@v1
with:
command: publish
args: --verbose --all-features --token ${{ secrets.CRATES_IO_TOKEN }}
run: cargo publish --verbose --all-features --token ${{ secrets.CRATES_IO_TOKEN }}

0 comments on commit 1533de3

Please sign in to comment.