Skip to content

Commit

Permalink
Merge pull request #5 from ourzora/erik/configure-ci
Browse files Browse the repository at this point in the history
Configure CI
  • Loading branch information
erikreppel authored Mar 25, 2024
2 parents dce984c + e80f634 commit b324d13
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Rust


on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
build_and_test:
runs-on: ubuntu-latest
environment: Testing

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

- name: seed
run: cargo install just && just ci

- name: Build
run: cargo build --verbose

- name: Test
run: cargo test --verbose

fmt:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true

- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
2 changes: 2 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ init:
seed:
touch dev.db
sqlx migrate run

ci: init seed

0 comments on commit b324d13

Please sign in to comment.