Skip to content

ECHO-670 Recording duration incorrect after pause and resume fix (#486) #1173

ECHO-670 Recording duration incorrect after pause and resume fix (#486)

ECHO-670 Recording duration incorrect after pause and resume fix (#486) #1173

Workflow file for this run

name: ci
on:
workflow_dispatch:
# on pull request, we will run only the ci checks
pull_request:
branches:
- main
merge_group:
branches:
- main
# on push, we will run ci then also push built images
push:
branches:
- main
- hotfix-*
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
ci-check-server:
name: ci-check-server
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: "3.11"
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('echo/server/requirements.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: pip install -r echo/server/requirements.lock
- name: Cache mypy
uses: actions/cache@v4
with:
path: echo/server/.mypy_cache
key: ${{ runner.os }}-mypy-${{ hashFiles('echo/server/pyproject.toml') }}-${{ hashFiles('echo/server/requirements.lock') }}
restore-keys: |
${{ runner.os }}-mypy-
- name: Run mypy
uses: tsuyoshicho/action-mypy@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
level: warning
workdir: echo/server
- name: Run ruff
uses: chartboost/ruff-action@v1
with:
src: echo/server
ci-check-frontend:
name: ci-check-frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./echo/frontend/
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "22"
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('echo/frontend/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm run lint
- name: Build
run: pnpm run build
ci-build-and-push-servers:
name: ci-build-servers
needs: [ci-check-server, ci-check-frontend]
runs-on: ubuntu-latest
strategy:
matrix:
image:
# Directus
- name: dbr-echo-directus
context: ./echo/directus
dockerfile: Dockerfile
tag: dbr-echo-directus
build_args: ""
# Shared image for server and worker
- name: dbr-echo-server
context: ./echo/server
dockerfile: Dockerfile
tag: dbr-echo-server
build_args: ""
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
# This enables the creation of a builder instance with persistent cache
driver-opts: |
image=moby/buildkit:latest
network=host
- name: Log in to DigitalOcean Container Registry
uses: docker/login-action@v2
with:
registry: registry.digitalocean.com
username: ${{ secrets.DO_REGISTRY_USERNAME }}
password: ${{ secrets.DO_REGISTRY_TOKEN }}
- name: Build (also push sometimes) ${{ matrix.image.name }}
uses: docker/build-push-action@v6
with:
context: ${{ matrix.image.context }}
file: ${{ matrix.image.context }}/${{ matrix.image.dockerfile }}
# Only push if the event is a push event to main.
push: ${{ github.event_name == 'push' }}
tags: registry.digitalocean.com/dbr-cr/${{ matrix.image.tag }}:${{ github.sha }}
build-args: ${{ matrix.image.build_args }}
# Enhanced cache settings - using GitHub Actions cache for better performance
cache-from: type=gha,scope=build-${{ matrix.image.name }}
cache-to: type=gha,scope=build-${{ matrix.image.name }},mode=max