diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e3ca47c..a3ccfc4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,23 +9,10 @@ jobs: name: Release 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: login - args: -- ${{secrets.CARGO_TOKEN}} - - uses: actions-rs/cargo@v1 - with: - command: publish - args: --manifest-path sqlxmq_macros/Cargo.toml + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo login ${{secrets.CARGO_TOKEN}} + - run: cargo publish --manifest-path sqlxmq_macros/Cargo.toml - name: Wait for crates.io to update run: sleep 30 - - uses: actions-rs/cargo@v1 - with: - command: publish - args: --manifest-path Cargo.toml + - run: cargo publish --manifest-path Cargo.toml diff --git a/.github/workflows/toolchain.yml b/.github/workflows/toolchain.yml index bc46de3..11f8dbb 100644 --- a/.github/workflows/toolchain.yml +++ b/.github/workflows/toolchain.yml @@ -7,47 +7,31 @@ jobs: name: Check 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: check + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - run: cargo check fmt: name: Rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: -- --check + components: rustfmt + - run: cargo fmt -- --check clippy: name: Clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true - - run: rustup component add clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-targets -- -D warnings + components: clippy + - uses: Swatinem/rust-cache@v2 + - run: cargo clippy --all-targets -- -D warnings test: name: Test @@ -55,21 +39,12 @@ jobs: env: RUST_BACKTRACE: "1" steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/install@v0.1 - with: - crate: sqlx-cli - use-tool-cache: true + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - run: cargo install sqlx-cli --locked - uses: ./.github/actions/postgres - - uses: actions-rs/cargo@v1 - with: - command: test - args: -- --nocapture + - run: cargo test -- --nocapture test_nightly: name: Test (Nightly) @@ -77,38 +52,20 @@ jobs: env: RUST_BACKTRACE: "1" steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true - - uses: actions-rs/install@v0.1 - with: - crate: sqlx-cli - use-tool-cache: true + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - uses: Swatinem/rust-cache@v2 + - run: cargo install sqlx-cli --locked - uses: ./.github/actions/postgres - - uses: actions-rs/cargo@v1 - with: - command: test - args: -- --nocapture + - run: cargo test -- --nocapture readme: name: Readme runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install rust stable - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - name: Install cargo-sync-readme - uses: actions-rs/install@v0.1 - with: - crate: cargo-sync-readme - version: latest - use-tool-cache: true + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - run: cargo install cargo-sync-readme --locked - name: Sync readme run: cargo sync-readme -c