@@ -32,19 +32,19 @@ jobs:
3232 save-if : ${{ false }}
3333 - name : Run clippy for core with all features
3434 run : |
35- cargo clippy --manifest-path sqlx-core/Cargo.toml \
35+ cargo clippy --locked -- manifest-path sqlx-core/Cargo.toml \
3636 --no-default-features \
3737 --features offline,all-databases,all-types,migrate,${{ matrix.tls }} \
3838 -- -D warnings
3939 - name : Run clippy for root with all features
4040 run : |
41- cargo clippy \
41+ cargo clippy --locked \
4242 --no-default-features \
4343 --features offline,all-databases,all-types,migrate,${{ matrix.tls }},macros \
4444 -- -D warnings
4545 - name : Run clippy for all targets
4646 run : |
47- cargo clippy \
47+ cargo clippy --locked \
4848 --no-default-features \
4949 --all-targets \
5050 --features offline,all-databases,all-types,migrate,${{ matrix.tls }} \
6464 save-if : ${{ false }}
6565 - run : sudo apt-get update && sudo apt-get install -y libodbc2 unixodbc-dev
6666 if : ${{ matrix.os == 'ubuntu-latest' }}
67- - run : cargo test
67+ - run : cargo test --locked
6868 --manifest-path sqlx-core/Cargo.toml
6969 --features offline,all-databases,all-types,rustls
7070
9494 with :
9595 prefix-key : v1-sqlx
9696 save-if : ${{ github.ref == 'refs/heads/main' }}
97- - run : cargo build
97+ - run : cargo build --locked
9898 --manifest-path sqlx-cli/Cargo.toml
9999 --bin cargo-sqlx
100100 ${{ matrix.args }}
@@ -121,11 +121,11 @@ jobs:
121121 save-if : ${{ github.ref == 'refs/heads/main' && matrix.tls == 'native-tls' }}
122122 - name : Run clippy for sqlite
123123 run : |
124- cargo clippy \
124+ cargo clippy --locked \
125125 --no-default-features \
126126 --features sqlite,all-types,${{ matrix.tls }},macros,migrate \
127127 -- -D warnings
128- - run : cargo test
128+ - run : cargo test --locked
129129 --no-default-features
130130 --features any,macros,migrate,sqlite,all-types,${{ matrix.tls }}
131131 env :
@@ -151,15 +151,15 @@ jobs:
151151 save-if : ${{ github.ref == 'refs/heads/main' && matrix.postgres == '14' }}
152152
153153 - run : |
154- cargo build --features postgres,all-types,${{ matrix.tls }}
154+ cargo build --locked -- features postgres,all-types,${{ matrix.tls }}
155155 env:
156156 # FIXME: needed to disable `ltree` tests in Postgres 9.6
157157 # but `PgLTree` should just fall back to text format
158158 RUSTFLAGS: --cfg postgres_${{ matrix.postgres }}
159159
160160 - name : Run clippy for postgres
161161 run : |
162- cargo clippy \
162+ cargo clippy --locked \
163163 --no-default-features \
164164 --features postgres,all-types,${{ matrix.tls }},macros,migrate \
165165 -- -D warnings
@@ -171,15 +171,15 @@ jobs:
171171 docker exec postgres_${{ matrix.postgres }} bash -c "until pg_isready; do sleep 1; done"
172172
173173 - run : |
174- cargo test --no-default-features --features any,postgres,macros,all-types,${{ matrix.tls }}
174+ cargo test --locked -- no-default-features --features any,postgres,macros,all-types,${{ matrix.tls }}
175175 env:
176176 DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx
177177 # FIXME: needed to disable `ltree` tests in Postgres 9.6
178178 # but `PgLTree` should just fall back to text format
179179 RUSTFLAGS: --cfg postgres_${{ matrix.postgres }}
180180
181181 - run : |
182- cargo test --no-default-features --features any,postgres,macros,migrate,all-types,${{ matrix.tls }}
182+ cargo test --locked -- no-default-features --features any,postgres,macros,migrate,all-types,${{ matrix.tls }}
183183 env:
184184 DATABASE_URL: postgres://postgres:password@localhost:5432/sqlx?sslmode=verify-ca&sslrootcert=./tests/certs/ca.crt
185185 # FIXME: needed to disable `ltree` tests in Postgres 9.6
@@ -199,7 +199,7 @@ jobs:
199199 save-if : ${{ false }}
200200 - run : docker compose up --wait postgres_16
201201 working-directory : tests
202- - run : cargo test --no-default-features --features any,postgres,macros,all-types,rustls
202+ - run : cargo test --locked -- no-default-features --features any,postgres,macros,all-types,rustls
203203 env :
204204 DATABASE_URL : postgres://postgres@localhost:5432/sqlx?sslmode=verify-ca&sslrootcert=./tests/certs/ca.crt&sslcert=./tests/certs/client.crt&sslkey=./tests/keys/client.key
205205
@@ -221,11 +221,11 @@ jobs:
221221 save-if : ${{ github.ref == 'refs/heads/main' && matrix.mysql == '8' }}
222222
223223 - run : |
224- cargo build --features mysql,all-types,${{ matrix.tls }}
224+ cargo build --locked -- features mysql,all-types,${{ matrix.tls }}
225225
226226 - name : Run clippy for mysql
227227 run : |
228- cargo clippy \
228+ cargo clippy --locked \
229229 --no-default-features \
230230 --features mysql,all-types,${{ matrix.tls }},macros,migrate \
231231 -- -D warnings
@@ -234,13 +234,13 @@ jobs:
234234 - run : sleep 60
235235
236236 - run : |
237- cargo test --no-default-features --features any,mysql,macros,migrate,all-types,${{ matrix.tls }}
237+ cargo test --locked -- no-default-features --features any,mysql,macros,migrate,all-types,${{ matrix.tls }}
238238 env:
239239 DATABASE_URL: mysql://root:password@localhost:3306/sqlx?ssl-mode=disabled
240240
241241 # MySQL 5.7 supports TLS but not TLSv1.3 as required by RusTLS.
242242 - run : |
243- cargo test --no-default-features --features any,mysql,macros,migrate,all-types,${{ matrix.tls }}
243+ cargo test --locked -- no-default-features --features any,mysql,macros,migrate,all-types,${{ matrix.tls }}
244244 if: ${{ !(matrix.mysql == '5_7' && matrix.tls == 'rustls') }}
245245 env:
246246 DATABASE_URL: mysql://root:password@localhost:3306/sqlx
@@ -263,11 +263,11 @@ jobs:
263263 save-if : ${{ github.ref == 'refs/heads/main' && matrix.mariadb == '10_6' }}
264264
265265 - run : |
266- cargo build --features mysql,${{ matrix.tls }}
266+ cargo build --locked -- features mysql,${{ matrix.tls }}
267267
268268 - name : Run clippy for mariadb
269269 run : |
270- cargo clippy \
270+ cargo clippy --locked \
271271 --no-default-features \
272272 --features mysql,${{ matrix.tls }},macros,migrate \
273273 -- -D warnings
@@ -276,7 +276,7 @@ jobs:
276276 - run : sleep 30
277277
278278 - run : |
279- cargo test --no-default-features --features any,mysql,macros,migrate,${{ matrix.tls }}
279+ cargo test --locked -- no-default-features --features any,mysql,macros,migrate,${{ matrix.tls }}
280280 env:
281281 DATABASE_URL: mysql://root:password@localhost:3306/sqlx
282282
@@ -298,11 +298,11 @@ jobs:
298298 save-if : ${{ github.ref == 'refs/heads/main' && matrix.mssql == '2022' }}
299299
300300 - run : |
301- cargo build --features mssql,all-types,${{ matrix.tls }}
301+ cargo build --locked -- features mssql,all-types,${{ matrix.tls }}
302302
303303 - name : Run clippy for mssql
304304 run : |
305- cargo clippy \
305+ cargo clippy --locked \
306306 --no-default-features \
307307 --features mssql,all-types,${{ matrix.tls }},macros,migrate \
308308 -- -D warnings
@@ -311,7 +311,7 @@ jobs:
311311 - run : sleep 80 # MSSQL takes a "bit" to startup
312312
313313 - run : |
314- cargo test --no-default-features --features any,mssql,macros,migrate,all-types,${{ matrix.tls }}
314+ cargo test --locked -- no-default-features --features any,mssql,macros,migrate,all-types,${{ matrix.tls }}
315315 env:
316316 DATABASE_URL: mssql://sa:Password123!@localhost/sqlx
317317
@@ -342,10 +342,10 @@ jobs:
342342 odbcinst -q -s || true
343343 echo "select 1;" | isql -v SQLX_PG_5432 || true
344344 - name : Run ODBC tests (PostgreSQL DSN)
345- run : cargo test --no-default-features --features any,odbc,macros,all-types,rustls
345+ run : cargo test --locked -- no-default-features --features any,odbc,macros,all-types,rustls
346346 env :
347347 DATABASE_URL : DSN=SQLX_PG_5432;UID=postgres;PWD=password
348348 - name : Run ODBC tests (SQLite driver)
349- run : cargo test --no-default-features --features any,odbc,macros,all-types,rustls
349+ run : cargo test --locked -- no-default-features --features any,odbc,macros,all-types,rustls
350350 env :
351351 DATABASE_URL : Driver={SQLite3};Database=./tests/odbc/sqlite.db
0 commit comments