Skip to content

Commit 16d1587

Browse files
authored
Merge branch 'main' into main
2 parents d2034e5 + 2a1a7d5 commit 16d1587

File tree

15 files changed

+675
-292
lines changed

15 files changed

+675
-292
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ jobs:
6868
- name: Install postgres (MacOS)
6969
if: runner.os == 'macOS' && matrix.backend == 'postgres'
7070
run: |
71-
/usr/local/opt/postgres/bin/pg_ctl -D /usr/local/var/postgres start
71+
initdb -D /usr/local/var/postgres
72+
pg_ctl -D /usr/local/var/postgres start
7273
sleep 3
73-
/usr/local/opt/postgres/bin/createuser -s postgres
74+
createuser -s postgres
7475
echo "DATABASE_URL=postgres://postgres@localhost/" >> $GITHUB_ENV
7576
7677
- name: Install mysql (MacOS)
@@ -106,33 +107,23 @@ jobs:
106107
echo "DATABASE_URL=mysql://root@localhost/diesel_test" >> $GITHUB_ENV
107108
108109
- name: Install rust toolchain
109-
uses: actions-rs/toolchain@v1
110+
uses: dtolnay/rust-toolchain@master
110111
with:
111-
profile: minimal
112112
toolchain: ${{ matrix.rust }}
113-
override: true
114113
- name: Rust version check
115-
uses: actions-rs/cargo@v1
116-
with:
117-
command: version
114+
run: cargo +${{ matrix.rust }} version
118115

119116
- name: Test diesel_async
120-
uses: actions-rs/cargo@v1
121-
with:
122-
command: test
123-
args: --manifest-path Cargo.toml --no-default-features --features "${{ matrix.backend }}"
117+
run: cargo +${{ matrix.rust }} test --manifest-path Cargo.toml --no-default-features --features "${{ matrix.backend }} deadpool bb8 mobc"
124118

125119
rustfmt_and_clippy:
126120
name: Check rustfmt style && run clippy
127121
runs-on: ubuntu-latest
128122
steps:
129123
- uses: actions/checkout@v2
130-
- uses: actions-rs/toolchain@v1
124+
- uses: dtolnay/rust-toolchain@stable
131125
with:
132-
toolchain: stable
133-
profile: minimal
134126
components: clippy, rustfmt
135-
override: true
136127
- name: Cache cargo registry
137128
uses: actions/cache@v2
138129
with:
@@ -148,13 +139,7 @@ jobs:
148139
find ~/.cargo/registry -iname "*clippy.toml" -delete
149140
150141
- name: Run clippy
151-
uses: actions-rs/cargo@v1
152-
with:
153-
command: clippy
154-
args: --all
142+
run: cargo +stable clippy --all
155143

156144
- name: Check formating
157-
uses: actions-rs/cargo@v1
158-
with:
159-
command: fmt
160-
args: --all -- --check
145+
run: cargo +stable fmt --all -- --check

Cargo.lock

Lines changed: 100 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "AGPL-v3"
99
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1010

1111
[dependencies]
12-
diesel = { version = "2.0.0-rc.1", default-features = false, features = ["i-implement-a-third-party-backend-and-opt-into-breaking-changes"]}
12+
diesel = { version = "2.0.0", default-features = false, features = ["i-implement-a-third-party-backend-and-opt-into-breaking-changes"]}
1313
async-trait = "0.1.51"
1414
futures = "0.3.17"
1515
tokio-postgres = { version = "0.7.2", optional = true}
@@ -28,11 +28,17 @@ chrono = "0.4"
2828
diesel = { version = "2.0.0-rc.1", default-features = false, features = ["chrono"]}
2929

3030
[features]
31-
default = ["postgres", "mysql", "deadpool", "bb8", "mobc"]
31+
default = []
3232
mysql = ["diesel/mysql_backend", "mysql_async", "mysql_common"]
3333
postgres = ["diesel/postgres_backend", "tokio-postgres", "tokio", "tokio/rt-multi-thread"]
3434

3535
[[test]]
3636
name = "integration_tests"
3737
path = "tests/lib.rs"
3838
harness = true
39+
40+
[package.metadata.docs.rs]
41+
features = ["postgres", "mysql", "deadpool", "bb8", "mobc"]
42+
no-default-features = true
43+
rustc-args = ["--cfg", "doc_cfg"]
44+
rustdoc-args = ["--cfg", "doc_cfg"]

0 commit comments

Comments
 (0)