Skip to content

Allowed to pass an instance on RegexEnum to RegexValidator directly #504

Allowed to pass an instance on RegexEnum to RegexValidator directly

Allowed to pass an instance on RegexEnum to RegexValidator directly #504

Workflow file for this run

name: Run Tests and Lint
on: [push]
permissions:
actions: read
contents: read
jobs:
build-and-test-pure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-docker-flask-inputfilter-pure-${{ hashFiles('env_configs/pure.Dockerfile') }}
restore-keys: |
${{ runner.os }}-docker-flask-inputfilter-pure-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=moby/buildkit:latest
- name: Build flask-inputfilter-pure image with cache
run: |
docker buildx build \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache,mode=max \
-t flask-inputfilter-pure -f env_configs/pure.Dockerfile . --load
- name: Run tests in Docker and upload coverage to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
set -x # Print commands and their arguments as they are executed.
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Exit immediately if a variable is not defined.
docker run --rm -e COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} flask-inputfilter-pure sh -c "coverage run --source=flask_inputfilter -m pytest tests/ && coveralls"
- name: Run code style checks
run: |
set -x # Print commands and their arguments as they are executed
set -e # Exit immediately if a command exits with a non-zero status
set -u # Exit immediately if a variable is not defined
docker run --rm flask-inputfilter-pure ruff check
build-and-test-cython:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-docker-flask-inputfilter-cython-${{ hashFiles('env_configs/cython.Dockerfile') }}
restore-keys: |
${{ runner.os }}-docker-flask-inputfilter-cython-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=moby/buildkit:latest
- name: Build flask-inputfilter-cython image with cache
run: |
docker buildx build \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache,mode=max \
-t flask-inputfilter-cython -f env_configs/cython.Dockerfile . --load
- name: Run tests in Docker
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
set -x # Print commands and their arguments as they are executed.
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Exit immediately if a variable is not defined.
docker run --rm flask-inputfilter-cython pytest