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

Fix CI #49

Merged
merged 1 commit into from
Oct 15, 2023
Merged
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
23 changes: 5 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
97 changes: 27 additions & 70 deletions .github/workflows/toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,108 +7,65 @@ 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
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
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
runs-on: ubuntu-latest
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)
runs-on: ubuntu-latest
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