Skip to content

Commit

Permalink
Merge pull request #16 from will-lynas/ci-caching
Browse files Browse the repository at this point in the history
More CI Changes
  • Loading branch information
will-lynas authored Oct 11, 2024
2 parents 1d6e2e2 + 0441120 commit a4ea051
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ on:
workflow_dispatch:

jobs:
test:
uses: ./.github/workflows/test.yml

deploy:
needs: test
runs-on: ubuntu-latest
steps:
- uses: will-lynas/[email protected]
Expand Down
33 changes: 20 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
on:
push:
branches:
- main
pull_request:
branches:
- "**"
workflow_dispatch:
workflow_call:

jobs:
test:
Expand All @@ -16,20 +14,29 @@ jobs:
- uses: extractions/setup-just@v2

- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
cache-on-failure: "true"

- shell: bash
run: |
just ci
cargo sqlx prepare --check
cargo fmt --check
cargo check
cargo check --tests
cargo clippy -- -D warnings
cargo test --all
run: just install

- shell: bash
run: cargo sqlx prepare --check

- shell: bash
run: cargo fmt --check

- shell: bash
run: cargo check

- shell: bash
run: cargo check --tests

- shell: bash
run: cargo clippy -- -D warnings

- shell: bash
run: cargo test --all
3 changes: 0 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ deploy:
just db-migrate
cargo build --release

ci:
just install

pre-push:
cargo sqlx prepare

Expand Down

0 comments on commit a4ea051

Please sign in to comment.