1
0
mirror of https://github.com/actix/examples synced 2025-04-22 08:34:52 +02:00

feat: added postgresql feature to the ci diesel_cli installation

This commit is contained in:
Alex Ted 2025-01-22 07:55:45 +03:00
parent e2a957eadd
commit f53394c132
3 changed files with 6 additions and 6 deletions

View File

@ -24,7 +24,7 @@ jobs:
- name: Install DB CLI tools - name: Install DB CLI tools
run: | run: |
cargo install --force sqlx-cli --no-default-features --features=sqlite,rustls cargo install --force sqlx-cli --no-default-features --features=sqlite,rustls
cargo install --force diesel_cli --no-default-features --features sqlite cargo install --force diesel_cli --no-default-features --features=sqlite,postgres
- name: Create Test DBs - name: Create Test DBs
env: env:

View File

@ -29,7 +29,7 @@ jobs:
- name: Install DB CLI tools - name: Install DB CLI tools
run: | run: |
cargo install --force sqlx-cli --no-default-features --features=sqlite,rustls cargo install --force sqlx-cli --no-default-features --features=sqlite,rustls
cargo install --force diesel_cli --no-default-features --features sqlite cargo install --force diesel_cli --no-default-features --features=sqlite,postgres
- name: Create Test DBs - name: Create Test DBs
env: env:

View File

@ -45,7 +45,7 @@ Inserts a new item into the PostgreSQL DB.
Provide a JSON payload with a name. Eg: Provide a JSON payload with a name. Eg:
```json ```json
{ "name": "bill" } { "name": "thingamajig" }
``` ```
On success, a response like the following is returned: On success, a response like the following is returned:
@ -53,7 +53,7 @@ On success, a response like the following is returned:
```json ```json
{ {
"id": "01948982-67d0-7a55-b4b1-8b8b962d8c6b", "id": "01948982-67d0-7a55-b4b1-8b8b962d8c6b",
"name": "bill" "name": "thingamajig"
} }
``` ```
@ -63,13 +63,13 @@ On success, a response like the following is returned:
Using [HTTPie]: Using [HTTPie]:
```sh ```sh
http POST localhost:8080/items name=bill http POST localhost:8080/items name=thingamajig
``` ```
Using cURL: Using cURL:
```sh ```sh
curl -S -X POST --header "Content-Type: application/json" --data '{"name":"bill"}' http://localhost:8080/items curl -S -X POST --header "Content-Type: application/json" --data '{"name":"thingamajig"}' http://localhost:8080/items
``` ```
</details> </details>