Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: swap to cargo fmt nightly #884

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/demo-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ jobs:
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
toolchain: nightly
components: clippy, rustfmt
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- name: Run cargo fmt
run: cargo fmt --all -- --check
working-directory: ./examples/demo
- name: Run cargo clippy
run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/loco-cli-e2e-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt
components: clippy, rustfmt
- name: Install seaorm cli
run: cargo install sea-orm-cli
- run: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/loco-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ jobs:
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
toolchain: nightly
components: clippy, rustfmt
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- name: Run cargo fmt
run: cargo fmt --all -- --check
working-directory: ./loco-cli
- name: Run cargo clippy
run: cargo clippy --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery -W rust-2018-idioms
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/loco-gen-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@ jobs:
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
toolchain: nightly
components: clippy, rustfmt
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/loco-rs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,12 @@ jobs:
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
toolchain: nightly
components: clippy, rustfmt
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/starter-lightweight-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ jobs:
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
toolchain: nightly
components: clippy, rustfmt
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- name: Run cargo fmt
run: cargo fmt --all -- --check
working-directory: ./starters/lightweight-service
- name: Run cargo clippy
run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/starter-rest-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ jobs:
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
toolchain: nightly
components: clippy, rustfmt
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
working-directory: ./starters/rest-api
- name: Run cargo clippy
run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility
- name: Run cargo fmt
run: cargo fmt --all -- --check
working-directory: ./starters/rest-api

test:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/starter-saas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ jobs:
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
toolchain: nightly
components: clippy, rustfmt
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- name: Run cargo fmt
run: cargo fmt --all -- --check
working-directory: ./starters/saas
- name: Run cargo clippy
run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility
Expand Down
3 changes: 2 additions & 1 deletion src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ pub struct Job {
#[serde(default)]
pub shell: bool,
#[serde(rename = "schedule")]
#[rustfmt::skip]
/// The cron expression defining the job's schedule.
///
/// The format is as follows:
/// sec min hour day of month month day of week year
/// * * * * * * *
/// * * * * * * *
pub cron: String,
/// Tags for tagging the job.
pub tags: Option<Vec<String>>,
Expand Down
4 changes: 2 additions & 2 deletions starters/lightweight-service/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
toolchain: nightly
components: clippy, rustfmt
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions starters/rest-api/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
toolchain: nightly
components: clippy, rustfmt
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions starters/saas/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
toolchain: nightly
components: clippy, rustfmt
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
Expand Down