Jonas L e320ce204e
ci: reduce usage (#1804)
* ci: move analyzer jobs in a dedicated workflow

* ci: move worker jobs in a dedicated workflow

* ci: move legacy jobs in a dedicated workflow

* ci: move shared jobs in a dedicated workflow

* ci: move api-client jobs to dedicated workflow

* ci: remove unused test job

* ci: move api jobs in a dedicated workflow

* ci: move playout ci jobs in a dedicated workflow

* ci: remove unused test job

* ci: move test-with-database in api workflow

* ci: run playout on api-client changes

* ci: rename tools workflow to dev-tools

* ci: rename generic tests workflow to project

* ci: rename lint-pr workflow to pr

* ci: update python tests concurrency

* ci: update python caching keys

* ci: update website/docs trigger condition

* ci: update legacy trigger condition

* ci: readd cancel in progress

* ci :update api cache key
2022-04-25 15:27:10 +02:00

69 lines
1.3 KiB
YAML

name: API
on:
push:
branches: [main]
paths:
- .github/workflows/**
- api/**
- shared/**
pull_request:
branches: [main]
paths:
- .github/workflows/**
- api/**
- shared/**
jobs:
python:
uses: ./.github/workflows/_python.yml
with:
context: api
test: false
test-with-database:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
release:
- buster
- bullseye
- bionic
- focal
- jammy
services:
postgres:
image: postgres
env:
POSTGRES_USER: libretime
POSTGRES_PASSWORD: libretime
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
container: ghcr.io/libretime/libretime-dev:${{ matrix.release }}
defaults:
run:
shell: bash
env:
LIBRETIME_DATABASE_HOST: postgres
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-api-${{ hashFiles('api/**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-api
- name: Test
run: make test
working-directory: api