File tree Expand file tree Collapse file tree 8 files changed +402
-16
lines changed
Expand file tree Collapse file tree 8 files changed +402
-16
lines changed Original file line number Diff line number Diff line change 11version : 2.1
22
33jobs :
4+ build_musl_and_test_ssl :
5+ docker :
6+ - image : cimg/rust:1.83-node
7+ - image : cimg/postgres:17.1
8+ environment :
9+ POSTGRES_USER : sql
10+ POSTGRES_PASSWORD : sql
11+ POSTGRES_DB : sql
12+ entrypoint : bash
13+ command : >
14+ -c '
15+ openssl req -nodes -new -x509 -subj "/CN=localhost" -keyout /tmp/server.key -out /tmp/server.crt &&
16+ chown postgres /tmp/server.key &&
17+ chmod 600 /tmp/server.key &&
18+ exec /docker-entrypoint.sh -c ssl=on -c ssl_cert_file=/tmp/server.crt -c ssl_key_file=/tmp/server.key
19+ '
20+ steps :
21+ - checkout
22+ - run : sudo apt update
23+ - run : sudo apt-get install -y musl-tools
24+ - run : rustup target add x86_64-unknown-linux-musl
25+ - run : cargo build --release --target x86_64-unknown-linux-musl
26+ - run : psql -d postgresql://sql:sql@localhost/sql?sslmode=require -f ./tests/test_db.sql
27+ - run : ./target/x86_64-unknown-linux-musl/release/sqlant postgresql://sql:sql@localhost/sql?sslmode=require
28+ resource_class : small
29+
430 run_integration_and_smoke_tests :
531 docker :
6- - image : cimg/rust:1.77 -node
32+ - image : cimg/rust:1.83 -node
733 environment :
834 TEST_DATABASE_URL : postgresql://sql:sql@localhost/sql
9- - image : cimg/postgres:14.2
35+ - image : cimg/postgres:17.1
1036 environment :
1137 POSTGRES_USER : sql
1238 POSTGRES_PASSWORD : sql
6793workflows :
6894 default :
6995 jobs :
96+ - build_musl_and_test_ssl
7097 - run_integration_and_smoke_tests
Original file line number Diff line number Diff line change 1+ name : Build and Run Docker Image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ services :
15+ postgres :
16+ image : postgis/postgis:15-3.3
17+ env :
18+ POSTGRES_USER : user
19+ POSTGRES_PASSWORD : password
20+ POSTGRES_DB : db
21+ options : >-
22+ --health-cmd pg_isready
23+ --health-interval 10s
24+ --health-timeout 5s
25+ --health-retries 5
26+ ports :
27+ - 5432:5432
28+
29+ steps :
30+ - name : Checkout Repository
31+ uses : actions/checkout@v4
32+
33+ - name : Build Docker Image
34+ run : docker build -t sqlant .
35+
36+ - name : Setup Apt packages
37+ run : sudo apt update && sudo apt install -y postgresql-client
38+
39+ - name : Setup DB schema
40+ run : psql -d postgresql://user:password@localhost/db -f ./tests/test_db.sql
41+
42+ - name : Run Docker Image
43+ run : docker run --network host sqlant postgresql://user:password@localhost/db
You can’t perform that action at this time.
0 commit comments