Skip to content

Add optional error handler arg to register and add/remove functions #53

Add optional error handler arg to register and add/remove functions

Add optional error handler arg to register and add/remove functions #53

Workflow file for this run

name: Test Suite
# Controls when the action will run.
on:
# Triggers the workflow on push for the master branch.
push:
branches: [ master ]
# Triggers the workflow on pull request for any branch.
pull_request:
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9" ]
django-version: [ "3.2" ]
steps:
# Checks-out the repository.
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
requirements.txt
dev_requirements.txt
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r dev_requirements.txt
pip install -q Django==${{ matrix.django-version }}.*
- name: Install Package
run: pip install -e .
- name: Run tests
run: |
coverage run --source='../autocompleter' --data-file='../.coverage.${{ matrix.python-version }}.${{ matrix.django-version }}' manage.py test
working-directory: ./test_project
- name: Create LCOV file
run: |
coverage lcov --data-file='.coverage.${{ matrix.python-version }}.${{ matrix.django-version }}'
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.python-version }}-${{ matrix.django-version }}
path-to-lcov: coverage.lcov
parallel: true
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true