77 Commits

Author SHA1 Message Date
Austin Bonander
7d4333e50d
fix(ci): backport change enabling CI on *-dev 2023-03-21 11:07:23 -07:00
Richard Bradfield
20877d83fd
Add extension support for SQLite (#2062)
* Add extension support for SQLite

While SQLite supports loading extensions at run-time via either the C
API or the SQL interface, they strongly recommend [1] only enabling the C
API so that SQL injections don't allow attackers to run arbitrary
extension code.

Here we take the most conservative approach, we enable only the C
function, and then only when the user requests extensions be loaded in
their `SqliteConnectOptions`, and disable it again once we're done
loading those requested modules. We don't add any support for loading
extensions via environment variables or connection strings.

Extensions in the options are stored as an IndexMap as the load order
can have side effects, they will be loaded in the order they are
supplied by the caller.

Extensions with custom entry points are supported, but a default API
is exposed as most users will interact with extensions using the
defaults.

[1]: https://sqlite.org/c3ref/enable_load_extension.html

* Add extension testing for SQlite

Extends x.py to download an appropriate shared object file for supported
operating systems, and uses wget to fetch one into the GitHub Actions
context for use by CI.

Overriding LD_LIBRARY_PATH for only this specific DB minimises the
impact on the rest of the suite.
2022-09-01 15:03:27 -07:00
Austin Bonander
956d8a823a
chore: add Discord link to issue templates 2022-08-15 18:07:50 -07:00
Austin Bonander
e04045cd66
fix: change extension of .github/ISSUE_TEMPLATE/config.yaml to .yml
YAML was a mistake, honestly.
2022-08-15 17:39:42 -07:00
Austin Bonander
ad594ce5cb
Add FAQ and discussions links 2022-08-15 17:36:53 -07:00
Austin Bonander
5245c9e627
Add issue templates (#2052) 2022-08-15 17:35:30 -07:00
Austin Bonander
054f61980a
feat: implement testing utilities (#2001) 2022-08-02 14:38:12 -07:00
Austin Bonander
60cc7c98fb
fix(actions): use rust-cache action (#1974)
I think the CI failures we've been seeing lately are due to bad incremental compilation artifacts being cached. The rust-cache action is smarter about what it actually caches.
2022-07-14 00:44:01 -07:00
Austin Bonander
bd40cc9a2f
fix(ci): fix workflow to run on main, not master 2022-06-23 17:23:40 -07:00
Bastian
6674e8ba96
Basic support for ltree (#1696)
* support ltree

* add default and push to PgLTree

* add more derived for ltree

* fix copy/paste

* Update sqlx-core/src/error.rs

Co-authored-by: Paolo Barbolini <paolo@paolo565.org>

* PR fixes

* ltree with name instead of OID

* custom ltree errors

* add pop ot PgLTree

* do not hide ltree behind feature flag

* bytes() instead of chars()

* apply extend_display suggestion

* add more functions to PgLTree

* fix IntoIter

* resolve PR annotation

* add tests

* remove code from arguments

* fix array

* fix setup isse

* fix(postgres): disable `ltree` tests on Postgres 9.6

Co-authored-by: Bastian Schubert <bastian.schubert@crosscard.com>
Co-authored-by: Paolo Barbolini <paolo@paolo565.org>
Co-authored-by: Austin Bonander <austin@launchbadge.com>
2022-02-15 20:40:03 -08:00
Austin Bonander
7fd324d337
fix(ci): pin MySQL version in the correct place 2022-02-11 12:55:23 -08:00
Austin Bonander
5466826d91
fix(ci): pin MySQL 8 version to 8.0.27
Fixes the build failures until 8.0.29 is released.
2022-02-11 12:31:42 -08:00
Paolo Barbolini
f2b3cc8dc3
ci: test on Postgres 14 (#1557) 2021-11-29 12:58:19 -08:00
Atkins
9f7205e80f
Fix GitHub Actions and integration test (#1346)
* fix test suite

* rustfmt

* need Row

* test: fix integration test scripts and update the upstream supported databases

Signed-off-by: Atkins Chang <atkinschang@gmail.com>

* ci(actions): update supported databases

Signed-off-by: Atkins Chang <atkinschang@gmail.com>

* ci(actions): use `pg_isready` instead of `sleep` to avoid error cause by database not ready

Signed-off-by: Atkins Chang <atkinschang@gmail.com>

* feat(core): add `trait PgConnectionInfo` for connection parameter status from server

Signed-off-by: Atkins Chang <atkinschang@gmail.com>

* test(postgres): fix integration test for postgres

Signed-off-by: Atkins Chang <atkinschang@gmail.com>

* test(mysql): fix integration tests

Signed-off-by: Atkins Chang <atkinschang@gmail.com>

* ci(actions): test database against the oldest and newest supported versions

Signed-off-by: Atkins Chang <atkinschang@gmail.com>

* docs(core): document `trait PgConnectionInfo`

Signed-off-by: Atkins Chang <atkinschang@gmail.com>

Co-authored-by: Montana Low <montanalow@gmail.com>
2021-07-28 14:00:34 -07:00
Alan D. Salewski
d17e7916ba gh actions: job 'mssql': use runtime feature name matrix for 'cargo build' step 2020-11-12 13:20:29 -08:00
Alan D. Salewski
d21dc1db11 gh actions: job 'mariadb': use runtime feature name matrix for 'cargo build' step 2020-11-12 13:20:29 -08:00
Alan D. Salewski
a61da5ee0d gh actions: job 'mysql': use runtime feature name matrix for 'cargo build' step 2020-11-12 13:20:29 -08:00
Alan D. Salewski
9ef2e066dc gh actions: job 'postgres': use runtime feature name matrix for 'cargo build' step 2020-11-12 13:20:29 -08:00
Alan D. Salewski
a9d0a842fb gh actions: use runtime feature name matrix for unit tests 2020-11-12 13:20:29 -08:00
Jonas Platte
a68872a35a Test rustls on CI 2020-11-12 07:32:59 -08:00
Jonas Platte
a161bcba05 Rename cargo features in preparation for rustls support 2020-11-12 07:32:21 -08:00
Austin Bonander
228729e2ee
fix: disable macOS build for sqlx-cli (for reals) 2020-10-18 03:33:44 -07:00
Austin Bonander
0ad121ba59 fix(ci): disable build for sqlx-cli on macOS 2020-10-17 02:43:31 -07:00
Raphaël Thériault
1d6a0a9547 Add a missing runtime annotation for CI caching 2020-07-27 01:24:45 -07:00
Raphaël Thériault
6bca82cce7 CI caching 2020-07-27 01:24:45 -07:00
Raphaël Thériault
d78bfa6aac Add actions build job for cargo-sqlx binaries 2020-07-27 01:24:45 -07:00
Raphaël Thériault
92646e00b8 Fix migrate! and add migration test 2020-07-23 17:46:27 -04:00
Ryan Leckey
0bd556e0ee test: double sleep time after mysql start up to hopefully stave off "connection aborted" errors in CI 2020-07-03 05:15:13 -07:00
Ryan Leckey
518eb0c41a chore: add any to all-databases and to each db test in CI 2020-06-27 06:04:30 -07:00
Ryan Leckey
9ce596d492 test: temporarily remove test against MSSQL 2017
Getting weird errors when trying to run this with docker. We may
have better luck setting up a Windows CI runner to handle the
majority of MSSQL testing anyway.
2020-06-11 03:39:23 -07:00
Ryan Leckey
0039fcc167 test: mysql port is 3306 2020-06-08 01:00:20 -07:00
Ryan Leckey
70e224327a test: fix yaml indents 2020-06-08 00:20:40 -07:00
Ryan Leckey
b46215eca8 test: matrix for mssql should be named mssql 2020-06-08 00:03:16 -07:00
Ryan Leckey
923c7aa18e test: fix sqlite configuration 2020-06-07 23:51:05 -07:00
Ryan Leckey
c37cc9960d test: add remaining databases to core workflow 2020-06-07 05:37:49 -07:00
Ryan Leckey
322f0d3c1c test: use a matrix to extend coverage of postgres 2020-06-07 04:10:07 -07:00
Ryan Leckey
92f67f51b7 test: use a matrix to scatter runtime features 2020-06-07 03:57:10 -07:00
Ryan Leckey
cc74a18861 test: wait for 'check' before running the postgres test and set the DATABASE_URL 2020-06-07 03:53:19 -07:00
Ryan Leckey
65c7216812 test: try out using docker-compose in CI 2020-06-07 03:47:31 -07:00
Ryan Leckey
df142b3485 test: fix runs-on directive, '-' over ':' 2020-06-07 02:27:22 -07:00
Ryan Leckey
0386d6ed6c test: re-initialize github workflow 2020-06-07 02:21:58 -07:00
Ryan Leckey
33dc215877
ci: small tweak to CI 2020-05-30 23:14:17 -07:00
Austin Bonander
7dae3dbf57 rename cargo-sqlx -> sqlx-cli
edit README
2020-05-30 16:02:37 -07:00
Austin Bonander
676b29efe3 add basic integration test for cargo-sqlx 2020-05-30 16:02:37 -07:00
Austin Bonander
a7d039931c fix UI tests
looks like the `.stderr` file for a SQLite UI test never got added, and notes on errors in other tests changed slightly
2020-04-27 19:43:54 -07:00
Samani G. Gikandi
45744e8033 Updates CI workflow for realworld
* Moves realworld into a separate file since it's long
* Adds checkout, db provisioning, and build steps for postgres and
  sqlite
2020-04-17 12:42:22 -07:00
xiaopengli89
c40288a8b4 Mysql/DECIMAL: add to CI 2020-04-10 15:35:58 -07:00
Reid Swan
58aa15cb8a Use psql client in container to make action less brittle 2020-04-07 04:08:58 -07:00
Reid Swan
42ff560577 Adds new Github Action to build examples 2020-04-02 15:36:12 +02:00
Ryan Leckey
6049f976f9 opt out of compatible type check for null values 2020-03-25 04:25:38 -07:00