-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffb0aff
commit a9c66ea
Showing
9 changed files
with
843 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build & Test | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: "-D warnings" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
default: ${{ github.ref }} | ||
type: string | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.platform }} (${{ matrix.target }}) (${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- linux-x64 | ||
- macos-arm64 | ||
- macos-x64 | ||
- windows-x64 | ||
|
||
include: | ||
- platform: linux-x64 | ||
os: ubuntu-latest | ||
- platform: macos-arm64 | ||
os: macos-14 | ||
- platform: macos-x64 | ||
os: macos-13 | ||
- platform: windows-x64 | ||
os: windows-latest | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
|
||
- name: Tests | ||
run: | | ||
cargo test --package postgresql_archive | ||
cargo test --package postgresql_archive --all-features | ||
cargo test --package postgresql_embedded | ||
cargo test --package postgresql_embedded --features blocking | ||
cargo test --package postgresql_embedded --features bundled | ||
cargo test --package postgresql_embedded --features tokio | ||
cargo test --package postgresql_embedded --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Fast checks | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: "-D warnings" | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
audit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
- name: Install cargo audit | ||
run: cargo install cargo-audit | ||
- name: Audit dependencies | ||
run: cargo audit | ||
|
||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
- name: Check the project | ||
run: | | ||
cargo check --workspace --all-targets --features blocking | ||
cargo check --workspace --all-targets --features bundled | ||
cargo check --workspace --all-targets --features tokio | ||
cargo check --workspace --all-targets --all-features | ||
deny: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
- name: Install cargo deny | ||
run: cargo install cargo-deny | ||
- name: Check licenses | ||
run: cargo deny check --allow duplicate | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
- name: Check documentation | ||
env: | ||
RUSTDOCFLAGS: -D warnings | ||
run: cargo doc --workspace --no-deps --document-private-items --all-features | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
components: rustfmt | ||
- name: Check formatting | ||
run: cargo fmt --all --check | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
- name: Check lints | ||
run: | | ||
cargo clippy --workspace --features blocking | ||
cargo clippy --workspace --features bundled | ||
cargo clippy --workspace --features tokio | ||
cargo clippy --workspace --all-features | ||
vet: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
- name: Install cargo vet | ||
run: cargo install cargo-vet | ||
- name: Vet thirdparty dependencies | ||
run: cargo vet check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
initialize: | ||
name: Initialize | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get PR head ref | ||
if: ${{ github.event_name == 'pull_request' }} | ||
id: pr_head_ref | ||
run: | | ||
echo "ref=refs/pull/${{ github.event.pull_request.number }}/head" >> $GITHUB_OUTPUT | ||
outputs: | ||
ref: >- | ||
${{ | ||
(github.event_name == 'pull_request' && startsWith(github.head_ref, 'release/v')) | ||
&& steps.pr_head_ref.outputs.ref | ||
|| github.ref | ||
}} | ||
checks: | ||
name: Checks | ||
uses: ./.github/workflows/checks.yml | ||
|
||
build: | ||
name: Build & Test | ||
needs: [initialize, checks] | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
ref: ${{ needs.init.outputs.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
# cargo-vet audits file | ||
|
||
[audits] |
Oops, something went wrong.