Skip to content

Merge pull request #54 from Vchen7629/frontend-session-id-update #30

Merge pull request #54 from Vchen7629/frontend-session-id-update

Merge pull request #54 from Vchen7629/frontend-session-id-update #30

Workflow file for this run

name: CI workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
jobs:
path-filter:
runs-on: ubuntu-latest
outputs:
frontend: ${{ steps.changes.outputs.frontend }}
audio_transcription: ${{ steps.changes.outputs.audio_transcription }}
client: ${{ steps.changes.outputs.client }}
conversation_briefing: ${{ steps.changes.outputs.conversation_briefing }}
face_detection: ${{ steps.changes.outputs.face_detection }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
frontend:
- 'frontend/**'
audio_transcription:
- 'backend/audio_transcription/src/**'
client:
- 'backend/client/**'
conversation_briefing:
- 'backend/conversation_briefing/**'
face_detection:
- 'backend/face_detection/**'
frontend-ci:
needs: path-filter
if: ${{ github.event_name == 'pull_request' && needs.path-filter.outputs.frontend == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v5
with:
node-version: '>=23.6.1'
- name: Install dependencies
working-directory: frontend
run: npm install --dev
- name: Run Linting
working-directory: frontend
run: npm run lint
- name: Run tests
working-directory: frontend
run: npm run test
audio-transcription-ci:
needs: path-filter
if: ${{ github.event_name == 'pull_request' && needs.path-filter.outputs.audio_transcription == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.19"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install the project
run: uv sync --locked --all-extras --dev
working-directory: ./backend/audio_transcription
- name: Run Linter and Formatting
run: |
uv run ruff check .
uv run ruff format --check
working-directory: ./backend/audio_transcription
- name: Run Type Checking
run: uv run pyrefly check
working-directory: ./backend/audio_transcription
- name: Run Unit/Integration Tests
run: make test_all
working-directory: ./backend/audio_transcription
client-ci:
needs: path-filter
if: ${{ github.event_name == 'pull_request' && needs.path-filter.outputs.client == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: v1.25.6
cache: 'true'
- name: Download Go modules
working-directory: ./backend/client
run: go mod download
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.6
working-directory: ./backend/client
- name: run tests
working-directory: ./backend/client/cmd
run: make test_all
conversation-briefing-ci:
needs: path-filter
if: ${{ github.event_name == 'pull_request' && needs.path-filter.outputs.conversation_briefing == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: v1.25.6
cache: 'true'
- name: Download Go modules
working-directory: ./backend/conversation_briefing
run: go mod download
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.6
working-directory: ./backend/conversation_briefing
- name: run tests
working-directory: ./backend/conversation_briefing/cmd
run: make test_all
face-detection-ci:
needs: path-filter
if: ${{ github.event_name == 'pull_request' && needs.path-filter.outputs.face_detection == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: v1.25.6
cache: 'true'
- name: Install dlib dependencies
run: |
sudo apt-get update
sudo apt-get install -y libdlib-dev libblas-dev libatlas-base-dev liblapack-dev libjpeg-turbo8-dev pkg-config gcc g++
- name: Download Go modules
working-directory: ./backend/face_detection
run: go mod download
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.6
working-directory: ./backend/face_detection
- name: run tests
working-directory: ./backend/face_detection/cmd
run: make test_all
coverage:
needs: path-filter
runs-on: ubuntu-latest
if: |
github.event_name == 'push' && (
needs.path-filter.outputs.audio_transcription == 'true' ||
needs.path-filter.outputs.client == 'true' ||
needs.path-filter.outputs.conversation_briefing == 'true' ||
needs.path-filter.outputs.face_detection == 'true'
)
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Run audio_transcription coverage
working-directory: ./backend/audio_transcription
run: make coverage
- uses: actions/setup-go@v5
with:
go-version-file: 'backend/client/go.mod'
- name: Install dlib dependencies for face_detection
run: |
sudo apt-get update
sudo apt-get install -y libdlib-dev libblas-dev libatlas-base-dev liblapack-dev libjpeg-turbo8-dev pkg-config gcc g++
- name: Run backend client coverage
working-directory: ./backend/client/cmd
run: make coverage
- name: Run conversation_briefing coverage
working-directory: ./backend/conversation_briefing/cmd
run: make coverage
- name: Run face_detection coverage
working-directory: ./backend/face_detection/cmd
run: make coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./backend/client/cmd/coverage.out,./backend/face_detection/cmd/coverage.out,./backend/conversation_briefing/cmd/coverage.out,./backend/audio_transcription/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}