Skip to content

lets just try dockah #16330

lets just try dockah

lets just try dockah #16330

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
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" --build-arg="CI=yes" --cache-to type=gha,mode=max --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: Dependencies
command: bin/deps
- name: Licenses
command: bin/licenses
- name: Translations
command: bin/translations
- name: User Documentation
command: bin/user-docs
- name: Developer Documentation
command: bin/dev-docs
runs-on: ubuntu-latest
container:
image: ghcr.io/pypi/warehouse:ci-${{ github.run_id }}
env:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
BILLING_BACKEND: warehouse.subscriptions.services.MockStripeBillingService api_base=http://stripe:12111 api_version=2020-08-27
volumes:
- .:/opt/warehouse/src
services:
postgres:
image: ${{ (matrix.name == 'Tests') && 'postgres:14.11' || '' }}
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 --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 }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Run ${{ matrix.name }}
run: |
cd /opt/warehouse/src/
/bin/bash -c "${{ matrix.command }}"