Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/bff-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: BFF Service CI (Rust)

on:
push:
branches: ["dev", "master"]
branches: ["dev", "main"]
paths:
- "backend/service/bff_service/**"
- "backend/libs/rust-core/**"
- "backend/proto/**"
- ".github/workflows/bff-ci.yml"
pull_request:
branches: ["dev", "master"]
branches: ["dev", "main"]
paths:
- "backend/service/bff_service/**"
- "backend/libs/rust-core/**"
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Protoc (Required for tonic-build)
- name: Install Protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler

- name: Setup Rust toolchain
Expand Down Expand Up @@ -66,11 +66,11 @@ jobs:
uses: taiki-e/install-action@cargo-audit

- name: Run Vulnerability Scan
working-directory: ${{ env.WORKING_DIR }}
working-directory: backend
run: cargo audit

test-and-coverage:
name: Unit & Integration Tests
name: Unit Tests & Coverage
runs-on: ubuntu-latest
needs: [lint-and-format, security-audit]
steps:
Expand All @@ -93,9 +93,9 @@ jobs:

- name: Run Tests & Generate Coverage
working-directory: ${{ env.WORKING_DIR }}
run: cargo llvm-cov test --all-features --workspace --lcov --output-path lcov.info --fail-under-lines 80
run: cargo llvm-cov test -p bff-service --all-features --lcov --output-path lcov.info --fail-under-lines 15

- name: Upload Coverage to Codecov (Optional)
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ${{ env.WORKING_DIR }}/lcov.info
Expand All @@ -119,6 +119,7 @@ jobs:
context: backend
file: backend/service/bff_service/Dockerfile
push: false
load: true
tags: stremo/bff-service:dev-test
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down
Loading
Loading