Skip to content

Cut jargon from the map and timelapse wording #376

Cut jargon from the map and timelapse wording

Cut jargon from the map and timelapse wording #376

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call:
inputs:
version:
required: true
type: string
outputs:
artifact-name:
value: ${{ jobs.build.outputs.artifact-name }}
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-24.04
timeout-minutes: 30
outputs:
artifact-name: ${{ steps.package.outputs.name }}-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: '22'
cache: npm
cache-dependency-path: frontend/package-lock.json
- uses: actions/setup-python@v7
with:
python-version: '3.12'
cache: pip
cache-dependency-path: backend/requirements*.txt
- name: Install frontend dependencies
working-directory: frontend
run: npm ci --no-audit --no-fund
- name: Install backend dependencies
run: python -m pip install -r backend/requirements.txt -r backend/requirements-dev.txt
- name: Test frontend
working-directory: frontend
run: npm test -- --reporter=default --reporter=junit --outputFile.junit=../test-results/frontend.xml
- name: Test backend
if: ${{ !cancelled() }}
working-directory: backend
run: python -m pytest -q --junitxml=../test-results/backend.xml
- name: Upload test reports
if: ${{ !cancelled() && hashFiles('test-results/*.xml') != '' }}
uses: actions/upload-artifact@v7
with:
name: test-reports-${{ github.run_id }}-${{ github.run_attempt }}
path: test-results/*.xml
if-no-files-found: error
- name: Cache Next.js build data
uses: actions/cache@v6
with:
path: frontend/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('frontend/package-lock.json') }}-${{ hashFiles('frontend/app/**', 'frontend/components/**', 'frontend/lib/**', 'frontend/public/**', 'frontend/next.config.*', 'frontend/tsconfig*.json', 'shared/**') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('frontend/package-lock.json') }}-
- name: Build frontend
working-directory: frontend
env:
NEXT_TELEMETRY_DISABLED: '1'
PS_PRODUCTION: '1'
NEXT_PUBLIC_API_URL: http://127.0.0.1:8000
run: npm run build
- name: Package application
id: package
env:
BUILD_VERSION: ${{ inputs.version }}
run: python .github/scripts/package.py
- uses: actions/upload-artifact@v7
with:
name: ${{ steps.package.outputs.name }}-${{ github.run_id }}-${{ github.run_attempt }}
path: dist/
if-no-files-found: error