Skip to content

Add simultaneous support for Werkzeug 2 and 3 #680

Add simultaneous support for Werkzeug 2 and 3

Add simultaneous support for Werkzeug 2 and 3 #680

Workflow file for this run

name: Gnocchi
on:
workflow_dispatch:
inputs:
debug:
description: 'Enable debug'
required: false
default: false
type: boolean
pull_request:
# NOTE(tobias-urdin): If you change any jobs make sure to modify
# the Mergify.io config in .mergify.yml to include the jobs!
jobs:
doc:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
env:
- docs
- docs-gnocchi-web
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: sudo chown -R 1001:1001 $GITHUB_WORKSPACE
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
ci_image:
- 'images/Dockerfile.ci'
- 'images/entrypoint.sh.ci'
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: steps.changes.outputs.ci_image == 'false'
- run: docker pull ghcr.io/gnocchixyz/ci:4.6
if: steps.changes.outputs.ci_image == 'false'
- uses: docker/build-push-action@v2
with:
context: ./images
file: ./images/Dockerfile.ci
push: false
tags: ghcr.io/gnocchixyz/ci:4.6
if: steps.changes.outputs.ci_image == 'true'
- name: Set env vars
run: |
if [ "${{ github.event.inputs.debug }}" == "true" ]; then
echo "DOCKER_ENV_OPTS=-e GNOCCHI_TEST_DEBUG=1" >> $GITHUB_ENV
else
echo "DOCKER_ENV_OPTS=" >> $GITHUB_ENV
fi
- name: Run tests with tox in container
run: docker run --rm -v ${{ github.workspace }}:/github/workspace -w /github/workspace $DOCKER_ENV_OPTS ghcr.io/gnocchixyz/ci:4.6 "tox -e ${{ matrix.env }}"
check:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
env:
- build
- pep8
steps:
- uses: actions/checkout@v4
- run: sudo chown -R 1001:1001 $GITHUB_WORKSPACE
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
ci_image:
- 'images/Dockerfile.ci'
- 'images/entrypoint.sh.ci'
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: steps.changes.outputs.ci_image == 'false'
- run: docker pull ghcr.io/gnocchixyz/ci:4.6
if: steps.changes.outputs.ci_image == 'false'
- uses: docker/build-push-action@v2
with:
context: ./images
file: ./images/Dockerfile.ci
push: false
tags: ghcr.io/gnocchixyz/ci:4.6
if: steps.changes.outputs.ci_image == 'true'
- name: Set env vars
run: |
if [ "${{ github.event.inputs.debug }}" == "true" ]; then
echo "DOCKER_ENV_OPTS=-e GNOCCHI_TEST_DEBUG=1" >> $GITHUB_ENV
else
echo "DOCKER_ENV_OPTS=" >> $GITHUB_ENV
fi
- name: Run tests with tox in container
run: docker run --rm -v ${{ github.workspace }}:/github/workspace -w /github/workspace $DOCKER_ENV_OPTS ghcr.io/gnocchixyz/ci:4.6 "tox -e ${{ matrix.env }}"
test:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
python:
- py39
- py311
env:
- mysql-ceph-upgrade-from-4.4
- postgresql-file-upgrade-from-4.4
- mysql-file
- mysql-file-sqlalchemy14
- mysql-swift
- mysql-s3
- mysql-ceph
- postgresql-file
- postgresql-file-sqlalchemy14
- postgresql-swift
- postgresql-s3
- postgresql-ceph
exclude:
- env: mysql-ceph-upgrade-from-4.4
python: py39
- env: mysql-ceph
python: py39
- env: postgresql-ceph
python: py39
- env: mysql-ceph-upgrade-from-4.4
python: py311
- env: mysql-ceph
python: py311
- env: postgresql-ceph
python: py311
steps:
- uses: actions/checkout@v4
- run: sudo chown -R 1001:1001 $GITHUB_WORKSPACE
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
ci_image:
- 'images/Dockerfile.ci'
- 'images/entrypoint.sh.ci'
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: steps.changes.outputs.ci_image == 'false'
- run: docker pull ghcr.io/gnocchixyz/ci:4.6
if: steps.changes.outputs.ci_image == 'false'
- uses: docker/build-push-action@v2
with:
context: ./images
file: ./images/Dockerfile.ci
push: false
tags: ghcr.io/gnocchixyz/ci:4.6
if: steps.changes.outputs.ci_image == 'true'
- name: Set env vars
run: |
if [ "${{ github.event.inputs.debug }}" == "true" ]; then
echo "DOCKER_ENV_OPTS=-e GNOCCHI_TEST_DEBUG=1" >> $GITHUB_ENV
else
echo "DOCKER_ENV_OPTS=" >> $GITHUB_ENV
fi
- name: Run tests with tox in container
run: docker run --rm -v ${{ github.workspace }}:/github/workspace -w /github/workspace $DOCKER_ENV_OPTS ghcr.io/gnocchixyz/ci:4.6 "tox -e ${{ matrix.python }}-${{ matrix.env }}"