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:
parent
e2a957eadd
commit
f53394c132
2
.github/workflows/ci-nightly.yml
vendored
2
.github/workflows/ci-nightly.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
||||
- name: Install DB CLI tools
|
||||
run: |
|
||||
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
|
||||
env:
|
||||
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
||||
- name: Install DB CLI tools
|
||||
run: |
|
||||
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
|
||||
env:
|
||||
|
@ -45,7 +45,7 @@ Inserts a new item into the PostgreSQL DB.
|
||||
Provide a JSON payload with a name. Eg:
|
||||
|
||||
```json
|
||||
{ "name": "bill" }
|
||||
{ "name": "thingamajig" }
|
||||
```
|
||||
|
||||
On success, a response like the following is returned:
|
||||
@ -53,7 +53,7 @@ On success, a response like the following is returned:
|
||||
```json
|
||||
{
|
||||
"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]:
|
||||
|
||||
```sh
|
||||
http POST localhost:8080/items name=bill
|
||||
http POST localhost:8080/items name=thingamajig
|
||||
```
|
||||
|
||||
Using cURL:
|
||||
|
||||
```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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user