Skip to content

Commit

Permalink
ci: use nightly, and overall cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
conradoplg committed Nov 14, 2023
1 parent 6c25312 commit 5b6c69a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 44 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ jobs:
with:
persist-credentials: false

- uses: actions-rs/toolchain@v1.0.7
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: stable
override: true
profile: minimal
components: llvm-tools-preview

- name: Install cargo-llvm-cov cargo command
Expand Down
61 changes: 21 additions & 40 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,26 @@ on:

jobs:

build_redpallas:
name: Build with redpallas
# We're using nightly for the async traits.
# TODO: Revert back to stable when that is stabilized.

test_ed25519:
name: Test with ed25519
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
- uses: dtolnay/rust-toolchain@nightly
- run: cargo test

test_redpallas:
name: Test with redpallas
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --features redpallas
- uses: dtolnay/rust-toolchain@nightly
- run: cargo test --features redpallas

clippy:
name: Clippy
Expand All @@ -27,34 +39,10 @@ jobs:
- uses: actions/[email protected]
with:
persist-credentials: false

- uses: actions-rs/[email protected]
with:
toolchain: stable
override: true

- name: Check workflow permissions
id: check_permissions
uses: scherermichael-oss/[email protected]
with:
required-permission: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run clippy action to produce annotations
uses: actions-rs/[email protected]
if: ${{ steps.check_permissions.outputs.has-permission }}
- uses: dtolnay/rust-toolchain@nightly
with:
# GitHub displays the clippy job and its results as separate entries
name: Clippy (stable) Results
token: ${{ secrets.GITHUB_TOKEN }}
# Notet that we don't use --all-features because we go against Rust
# convention and have a non-additive "redpallas" feature, and the
# tests only work without it currently.
args: --all-targets -- -D warnings

components: rustfmt, clippy
- name: Run clippy manually without annotations
if: ${{ !steps.check_permissions.outputs.has-permission }}
run: cargo clippy --all-targets -- -D warnings

fmt:
Expand All @@ -65,19 +53,12 @@ jobs:
- uses: actions/[email protected]
with:
persist-credentials: false

- uses: actions-rs/[email protected]
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: stable
components: rustfmt
override: true

- uses: Swatinem/rust-cache@v2

- uses: actions-rs/[email protected]
with:
command: fmt
args: --all -- --check
- name: Run rustfmt
run: cargo fmt --all -- --check

actionlint:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5b6c69a

Please sign in to comment.