This commit is contained in:
Diggory Blake 2023-10-15 15:35:23 +01:00
parent c1d7ad4a2f
commit 387b301656
No known key found for this signature in database
GPG key ID: E6BDFA83146ABD40
2 changed files with 32 additions and 88 deletions

View file

@ -9,23 +9,10 @@ jobs:
name: Release name: Release
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with: - run: cargo login ${{secrets.CARGO_TOKEN}}
profile: minimal - run: cargo publish --manifest-path sqlxmq_macros/Cargo.toml
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
- name: Wait for crates.io to update - name: Wait for crates.io to update
run: sleep 30 run: sleep 30
- uses: actions-rs/cargo@v1 - run: cargo publish --manifest-path Cargo.toml
with:
command: publish
args: --manifest-path Cargo.toml

View file

@ -7,47 +7,31 @@ jobs:
name: Check name: Check
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with: - uses: Swatinem/rust-cache@v2
profile: minimal - run: cargo check
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
fmt: fmt:
name: Rustfmt name: Rustfmt
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with: with:
profile: minimal components: rustfmt
toolchain: stable - run: cargo fmt -- --check
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
clippy: clippy:
name: Clippy name: Clippy
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with: with:
profile: minimal components: clippy
toolchain: stable - uses: Swatinem/rust-cache@v2
override: true - run: cargo clippy --all-targets -- -D warnings
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings
test: test:
name: Test name: Test
@ -55,21 +39,12 @@ jobs:
env: env:
RUST_BACKTRACE: "1" RUST_BACKTRACE: "1"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@stable
with: - uses: Swatinem/rust-cache@v2
profile: minimal - run: cargo install sqlx-cli --locked
toolchain: stable
override: true
- uses: actions-rs/install@v0.1
with:
crate: sqlx-cli
use-tool-cache: true
- uses: ./.github/actions/postgres - uses: ./.github/actions/postgres
- uses: actions-rs/cargo@v1 - run: cargo test -- --nocapture
with:
command: test
args: -- --nocapture
test_nightly: test_nightly:
name: Test (Nightly) name: Test (Nightly)
@ -77,38 +52,20 @@ jobs:
env: env:
RUST_BACKTRACE: "1" RUST_BACKTRACE: "1"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1 - uses: dtolnay/rust-toolchain@nightly
with: - uses: Swatinem/rust-cache@v2
profile: minimal - run: cargo install sqlx-cli --locked
toolchain: nightly
override: true
- uses: actions-rs/install@v0.1
with:
crate: sqlx-cli
use-tool-cache: true
- uses: ./.github/actions/postgres - uses: ./.github/actions/postgres
- uses: actions-rs/cargo@v1 - run: cargo test -- --nocapture
with:
command: test
args: -- --nocapture
readme: readme:
name: Readme name: Readme
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Install rust stable - uses: dtolnay/rust-toolchain@stable
uses: actions-rs/toolchain@v1 - uses: Swatinem/rust-cache@v2
with: - run: cargo install cargo-sync-readme --locked
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
- name: Sync readme - name: Sync readme
run: cargo sync-readme -c run: cargo sync-readme -c