Skip to content

Commit

Permalink
ci: update (#711)
Browse files Browse the repository at this point in the history
* ci: update
* fix uniq types
  • Loading branch information
jondot authored Aug 18, 2024
1 parent 98b0814 commit 051071a
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 8 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci-generators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,52 @@ jobs:
env:
REDIS_URL: redis://localhost:${{job.services.redis.ports[6379]}}
DATABASE_URL: ${{matrix.db}}

- name: test ${{ matrix.field_type }} scaffold field type
run: |
cargo run -- generate scaffold room \
uuid_uniq:uuid \
uuid_null:uuid_col \
uuid:uuid_col! \
string_null:string \
string:string! \
string_uniq:string^ \
text_null:text \
text:text! \
tiny_integer_null:tiny_int \
tiny_integer:tiny_int! \
tiny_integer_uniq:tiny_int^ \
small_integer_null:small_int \
small_integer:small_int! \
small_integer_uniq:small_int^ \
integer_null:int \
integer:int! \
integer_uniq:int^ \
big_integer_null:big_int \
big_integer:big_int! \
big_integer_uniq:big_int^ \
float_null:float \
float:float! \
double_null:double \
double:double! \
decimal_null:decimal \
decimal:decimal! \
decimal_len_null:decimal_len \
decimal_len:decimal_len! \
boolean_null:bool \
boolean:bool! \
timestamp_with_time_zone_null:tstz \
timestamp_with_time_zone:tstz! \
date_null:date \
date:date! \
timestamp_null:ts \
timestamp:ts! \
json_null:json \
json:json! \
json_binary_null:jsonb \
json_binary:jsonb! \
&& cargo build
working-directory: ./examples/demo
env:
REDIS_URL: redis://localhost:${{job.services.redis.ports[6379]}}
DATABASE_URL: ${{matrix.db}}
16 changes: 8 additions & 8 deletions src/gen/mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"field_types": [
{
"name": "uuid",
"rust": "Option<Uuid>",
"rust": "Uuid",
"schema": "uuid_uniq"
},
{
Expand Down Expand Up @@ -42,32 +42,32 @@
},
{
"name": "tiny_int",
"rust": "Option<i32>",
"rust": "Option<i16>",
"schema": "tiny_integer_null"
},
{
"name": "tiny_int!",
"rust": "i32",
"rust": "i16",
"schema": "tiny_integer"
},
{
"name": "tiny_int^",
"rust": "i32",
"rust": "i16",
"schema": "tiny_integer_uniq"
},
{
"name": "small_int",
"rust": "Option<i32>",
"rust": "Option<i16>",
"schema": "small_integer_null"
},
{
"name": "small_int!",
"rust": "i32",
"rust": "i16",
"schema": "small_integer"
},
{
"name": "small_int^",
"rust": "i32",
"rust": "i16",
"schema": "small_integer_uniq"
},
{
Expand All @@ -82,7 +82,7 @@
},
{
"name": "int^",
"rust": "Option<i32>",
"rust": "i32",
"schema": "integer_uniq"
},
{
Expand Down
2 changes: 2 additions & 0 deletions src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ pub use axum::{
pub use axum_extra::extract::cookie;
pub use chrono::NaiveDateTime as DateTime;
pub use include_dir::{include_dir, Dir};
// some types required for controller generators
pub use sea_orm::prelude::{Date, DateTimeWithTimeZone, Decimal, Uuid};
#[cfg(feature = "with-db")]
pub use sea_orm::{
ActiveModelBehavior, ActiveModelTrait, ActiveValue, ColumnTrait, ConnectionTrait,
Expand Down

0 comments on commit 051071a

Please sign in to comment.