Skip to content

Translations update from Weblate (#14641) #2

Translations update from Weblate (#14641)

Translations update from Weblate (#14641) #2

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
merge_group:
types: [checks_requested]
workflow_dispatch: # generally only for the "combine-prs" workflow
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
deps:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install platform dependencies
run: |
sudo apt -y update
sudo apt -y install libcurl4-openssl-dev libssl-dev pkg-config libxml2-dev libxslt-dev
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- name: pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}
- name: Cache built Python environment
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'requirements/*.txt') }}
- name: Install Python dependencies
run: |
pip install -U setuptools wheel pip
pip install -r requirements.txt --no-deps
pip install -r requirements/dev.txt
pip check
test:
needs: deps
strategy:
matrix:
include:
- name: Tests
command: bin/tests --postgresql-host localhost
- name: Lint
command: bin/lint
- name: User Documentation
command: bin/user-docs
- name: Developer Documentation
command: bin/dev-docs
- name: Dependencies
command: bin/github-actions-deps
- name: Licenses
command: bin/licenses
- name: Translations
command: bin/translations
runs-on: ubuntu-latest
services:
postgres:
image: ${{ (matrix.name == 'Tests') && 'postgres:14.4' || '' }}
ports:
- 5432:5432
env:
POSTGRES_HOST_AUTH_METHOD: trust # never do this in production!
# Set health checks to wait until postgres has started
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
stripe:
image: ${{ (matrix.name == 'Tests') && 'stripe/stripe-mock:v0.162.0' || '' }}
ports:
- 12111:12111
name: ${{ matrix.name }}
env:
BILLING_BACKEND: warehouse.subscriptions.services.MockStripeBillingService api_base=http://localhost:12111 api_version=2020-08-27
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install platform dependencies
run: |
sudo apt -y update
sudo apt -y install libcurl4-openssl-dev libssl-dev pkg-config libxml2-dev libxslt-dev
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- name: Cache mypy results
if: ${{ (matrix.name == 'Lint') }}
uses: actions/cache@v3
with:
path: |
.mypy_cache
key: ${{ runner.os }}-mypy-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'requirements/*.txt') }}
- name: Restore built Python environment from deps
uses: actions/cache/restore@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'requirements/*.txt') }}
# Since we don't install deps again, we fail if we can't restore the cache (timeout, etc)
fail-on-cache-miss: true
- name: Run ${{ matrix.name }}
run: ${{ matrix.command }}