lets just try dockah #16307
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
packages: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Expose GitHub Runtime | |
uses: crazy-max/ghaction-github-runtime@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker Image | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
docker buildx build --build-arg="DEVEL=yes" --cache-to type=gha --cache-from type=gha --push -t ghcr.io/pypi/warehouse:ci-${{ github.run_id }} . | |
test: | |
needs: build | |
strategy: | |
matrix: | |
include: | |
- name: Tests | |
command: bin/tests --postgresql-host postgres | |
- 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 | |
container: | |
image: ghcr.io/pypi/warehouse:ci-${{ github.run_id }} | |
services: | |
postgres: | |
image: ${{ (matrix.name == 'Tests') && 'postgres:14.11' || '' }} | |
ports: | |
- 5432:5432 | |
env: | |
LC_ALL: C.UTF-8 | |
LANG: C.UTF-8 | |
POSTGRES_HOST_AUTH_METHOD: trust # never do this in production! | |
# Set health checks to wait until postgres has started | |
options: --health-cmd "pg_isready --username=postgres --dbname=postgres" --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://stripe:12111 api_version=2020-08-27 | |
steps: | |
- name: Run ${{ matrix.name }} | |
run: | | |
cd /opt/warehouse/src/ | |
${{ matrix.command }} |