-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Jim-Hodapp-Coaching/introduce_basic_githu…
…b_ci_config Introduce build and test GitHub Actions CI config
- Loading branch information
Showing
4 changed files
with
67 additions
and
5 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,61 @@ | ||
name: Build & Tests (backend) | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build_test_run: | ||
name: Build and test | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: x86_64-unknown-linux-gnu | ||
|
||
- name: Use cached dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: "ubuntu-22.04-x86_64-unknown-linux-gnu" | ||
|
||
- name: Install seaORM CLI | ||
run: | | ||
cargo install sea-orm-cli | ||
- name: Build | ||
run: cargo build --all-targets | ||
|
||
- name: Test | ||
run: cargo test | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use cached dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: "ubuntu-22.04-x86_64-unknown-linux-gnu" | ||
|
||
- name: Install clippy and rustfmt | ||
run: | | ||
rustup component add clippy | ||
rustup component add rustfmt | ||
- name: Run clippy | ||
run: cargo clippy -- -Dwarnings | ||
|
||
- name: Run fmt | ||
run: cargo fmt --check |
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
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