68
68
- name : Install postgres (MacOS)
69
69
if : runner.os == 'macOS' && matrix.backend == 'postgres'
70
70
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
72
73
sleep 3
73
- /usr/local/opt/postgres/bin/ createuser -s postgres
74
+ createuser -s postgres
74
75
echo "DATABASE_URL=postgres://postgres@localhost/" >> $GITHUB_ENV
75
76
76
77
- name : Install mysql (MacOS)
@@ -106,33 +107,23 @@ jobs:
106
107
echo "DATABASE_URL=mysql://root@localhost/diesel_test" >> $GITHUB_ENV
107
108
108
109
- name : Install rust toolchain
109
- uses : actions-rs/ toolchain@v1
110
+ uses : dtolnay/rust- toolchain@master
110
111
with :
111
- profile : minimal
112
112
toolchain : ${{ matrix.rust }}
113
- override : true
114
113
- name : Rust version check
115
- uses : actions-rs/cargo@v1
116
- with :
117
- command : version
114
+ run : cargo +${{ matrix.rust }} version
118
115
119
116
- 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"
124
118
125
119
rustfmt_and_clippy :
126
120
name : Check rustfmt style && run clippy
127
121
runs-on : ubuntu-latest
128
122
steps :
129
123
- uses : actions/checkout@v2
130
- - uses : actions-rs/ toolchain@v1
124
+ - uses : dtolnay/rust- toolchain@stable
131
125
with :
132
- toolchain : stable
133
- profile : minimal
134
126
components : clippy, rustfmt
135
- override : true
136
127
- name : Cache cargo registry
137
128
uses : actions/cache@v2
138
129
with :
@@ -148,13 +139,7 @@ jobs:
148
139
find ~/.cargo/registry -iname "*clippy.toml" -delete
149
140
150
141
- name : Run clippy
151
- uses : actions-rs/cargo@v1
152
- with :
153
- command : clippy
154
- args : --all
142
+ run : cargo +stable clippy --all
155
143
156
144
- 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
0 commit comments