forked from WeblateOrg/weblate
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 1.46 KB
/
api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright © Michal Čihař <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: API
on:
push:
branches-ignore:
- deepsource-fix-**
- renovate/**
- weblate
pull_request:
permissions:
contents: read
jobs:
api-lint:
runs-on: ubuntu-24.04
continue-on-error: ${{ matrix.experimental }}
name: API Lint
env:
CI_DATABASE: postgresql
CI_REDIS_HOST: 127.0.0.1
CI_REDIS_PORT: '60001'
CI_DB_PASSWORD: weblate
CI_DB_HOST: 127.0.0.1
CI_DB_PORT: '60000'
CI_SELENIUM: '1'
DJANGO_SETTINGS_MODULE: weblate.settings_test
PYTHONWARNINGS: default,ignore:unclosed:ResourceWarning
PYTHONUNBUFFERED: 1
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: ''
cache-suffix: ${{ matrix.python-version }}
- name: Start services
run: ./ci/services-up $CI_DATABASE
- name: Install apt dependencies
run: sudo ./ci/apt-install $CI_DATABASE
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Used versions
run: ./ci/print-versions
- name: Install Python dependencies
run: ./ci/pip-install latest
- name: Generate OpenAPI
run: ./manage.py spectacular > weblate-openapi.yaml
- name: openapi-lint
uses: mhiew/redoc-lint-github-action@v4
with:
args: weblate-openapi.yaml