mirror of
https://github.com/actix/examples
synced 2025-04-22 00:26:51 +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
|
- 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:
|
||||||
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -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:
|
||||||
|
@ -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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user