Skip to content

Commit

Permalink
ci: enable running rust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ResuBaka committed Feb 24, 2025
1 parent 6e84835 commit 0f68b38
Show file tree
Hide file tree
Showing 3 changed files with 308 additions and 284 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/main-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ jobs:
run: rustup toolchain install stable --profile minimal
- name: Lint
run: cargo fmt --check
backend-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust/api-server
steps:
- uses: actions/checkout@v4
- name: Rust setup
run: rustup toolchain install stable --profile minimal
- name: Test
run: cargo test --workspace -- --nocapture
backend-build:
runs-on: ubuntu-latest
defaults:
Expand Down Expand Up @@ -95,7 +106,8 @@ jobs:
needs:
- backend-build
- backend-lint
if: ${{ needs.backend-build.result == 'success' && needs.backend-lint.result == 'success' }}
- backend-test
if: ${{ needs.backend-build.result == 'success' && needs.backend-lint.result == 'success' && needs.backend-test.result == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ jobs:
run: rustup toolchain install stable --profile minimal
- name: Lint
run: cargo fmt --check
backend-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust/api-server
steps:
- uses: actions/checkout@v4
- name: Rust setup
run: rustup toolchain install stable --profile minimal
- name: Test
run: cargo test --workspace -- --nocapture
backend-build:
runs-on: ubuntu-latest
defaults:
Expand Down Expand Up @@ -93,7 +104,8 @@ jobs:
needs:
- backend-build
- backend-lint
if: ${{ needs.backend-build.result == 'success' && needs.backend-lint.result == 'success' }}
- backend-test
if: ${{ needs.backend-build.result == 'success' && needs.backend-lint.result == 'success' && needs.backend-test.result == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
Loading

0 comments on commit 0f68b38

Please sign in to comment.