-
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.
* Added CI * Install sqlx and setup the sqlite database * Added `rustls` to the sqlx installer * Switched to `cargo-install` so the binaries can be cached between builds * Updated dependabot to also update the github-actions * Fixed wrong cargo package being installed
- Loading branch information
1 parent
3c8f261
commit 65eef13
Showing
3 changed files
with
108 additions
and
1 deletion.
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
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,63 @@ | ||
on: [push] | ||
|
||
name: Lint & clippy | ||
|
||
jobs: | ||
lints: | ||
name: Lints | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: rustfmt | ||
|
||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
runtime: [async-std] | ||
front: [terminal] | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: clippy | ||
|
||
- name: Install sqlx | ||
uses: baptiste0928/cargo-install@v1 | ||
with: | ||
crate: sqlx-cli | ||
version: 0.6 | ||
features: sqlite,rustls | ||
args: --no-default-features | ||
|
||
- name: Setup database | ||
run: | | ||
echo "DATABASE_URL=sqlite://database.db" >> .env | ||
sqlx database setup --source data/sqlite/migrations | ||
- name: Run cargo clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --features runtime-${{ matrix.runtime }},data-sqlite,front-${{ matrix.front }} -- -D warnings |
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,40 @@ | ||
on: [push] | ||
|
||
name: build | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
runtime: [async-std] | ||
front: [terminal] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install latest stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Install sqlx | ||
uses: baptiste0928/cargo-install@v1 | ||
with: | ||
crate: sqlx-cli | ||
version: 0.6 | ||
features: sqlite,rustls | ||
args: --no-default-features | ||
|
||
- name: Setup database | ||
run: | | ||
echo "DATABASE_URL=sqlite://database.db" >> .env | ||
sqlx database setup --source data/sqlite/migrations | ||
- name: Test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --features runtime-${{ matrix.runtime }},data-sqlite,front-${{ matrix.front }} |