-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
93 changed files
with
14,629 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# DATABASE_URL="mssql://sa:YourStrong()Passw0rd@localhost/AdventureWorksLT2016" | ||
# DATABASE_URL="mysql://root:root@localhost/AdventureWorksLT2016" | ||
# DATABASE_URL="postgres://root:root@localhost/adventureworkslt2016" | ||
DATABASE_URL="sqlite://db.sqlite?mode=rwc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# DATABASE_URL="mssql://sa:YourStrong()Passw0rd@localhost/AdventureWorksLT2016" | ||
# DATABASE_URL="mysql://root:root@localhost/AdventureWorksLT2016" | ||
# DATABASE_URL="postgres://root:root@localhost/adventureworkslt2016" | ||
DATABASE_URL="sqlite://db.sqlite?mode=rwc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
name: tests | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
- '.github/ISSUE_TEMPLATE/**' | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
- '.github/ISSUE_TEMPLATE/**' | ||
branches: | ||
- main | ||
- 1.*.x | ||
- 0.*.x | ||
- pr/**/ci | ||
- ci-* | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
- run: cargo clippy --all -- -D warnings | ||
- run: cargo clippy --manifest-path migration/Cargo.toml -- -D warnings | ||
|
||
rustfmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly | ||
components: rustfmt | ||
- run: cargo fmt --all -- --check | ||
- run: cargo fmt --manifest-path migration/Cargo.toml --all -- --check | ||
|
||
sqlite: | ||
name: SQLite | ||
runs-on: ubuntu-latest | ||
env: | ||
DATABASE_URL: "sqlite://db.sqlite?mode=rwc" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- run: cargo run --no-default-features --features sqlx-sqlite task seed_data | ||
|
||
mysql: | ||
name: MySQL | ||
runs-on: ubuntu-latest | ||
env: | ||
DATABASE_URL: "mysql://root:@localhost/AdventureWorksLT2016" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: [lts] | ||
services: | ||
mysql: | ||
image: mysql:${{ matrix.version }} | ||
env: | ||
MYSQL_HOST: 127.0.0.1 | ||
MYSQL_DB: mysql | ||
MYSQL_USER: sea | ||
MYSQL_PASSWORD: sea | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
ports: | ||
- "3306:3306" | ||
options: >- | ||
--health-cmd="mysqladmin ping" | ||
--health-interval=10s | ||
--health-timeout=5s | ||
--health-retries=3 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- run: mysql -uroot -h 127.0.0.1 mysql -e 'CREATE DATABASE `AdventureWorksLT2016`' | ||
- run: cargo run --no-default-features --features sqlx-mysql task seed_data | ||
|
||
mariadb: | ||
name: MariaDB | ||
runs-on: ubuntu-latest | ||
env: | ||
DATABASE_URL: "mysql://root:@localhost/AdventureWorksLT2016" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: [lts] | ||
services: | ||
mariadb: | ||
image: mariadb:${{ matrix.version }} | ||
env: | ||
MARIADB_HOST: 127.0.0.1 | ||
MARIADB_DB: mysql | ||
MARIADB_USER: sea | ||
MARIADB_PASSWORD: sea | ||
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes | ||
ports: | ||
- "3306:3306" | ||
options: >- | ||
--health-cmd="healthcheck.sh | ||
--connect | ||
--innodb_initialized" | ||
--health-interval=10s | ||
--health-timeout=5s | ||
--health-retries=3 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- run: mysql -uroot -h 127.0.0.1 mysql -e 'CREATE DATABASE `AdventureWorksLT2016`' | ||
- run: cargo run --no-default-features --features sqlx-mysql task seed_data | ||
|
||
postgres: | ||
name: Postgres | ||
runs-on: ubuntu-latest | ||
env: | ||
DATABASE_URL: "postgres://root:root@localhost/AdventureWorksLT2016" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: [14, 16] | ||
services: | ||
postgres: | ||
image: postgres:${{ matrix.version }} | ||
env: | ||
POSTGRES_HOST: 127.0.0.1 | ||
POSTGRES_USER: root | ||
POSTGRES_PASSWORD: root | ||
ports: | ||
- "5432:5432" | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- run: psql -q postgres://root:root@localhost/postgres -c 'CREATE DATABASE "AdventureWorksLT2016"' | ||
- run: cargo run --no-default-features --features sqlx-postgres task seed_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
**/config/local.yaml | ||
**/config/*.local.yaml | ||
|
||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# include cargo lock | ||
!Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
# SQLite | ||
*.sqlite | ||
|
||
.DS_Store |
Oops, something went wrong.