This repository was archived by the owner on Oct 11, 2025. It is now read-only.
Point to a more actively developed fork #43
This file contains hidden or 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: Python tests | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python: [ 3.8 ] | |
| services: | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install coveralls==2.1.2 -r requirements.txt | |
| sed -e 's/ACTUAL_REDIS_PORT/${{ job.services.redis.ports[6379] }}/' < .github/workflows/config.py > config.py | |
| cat config.py | |
| - name: Run tests | |
| run: | | |
| coverage run --omit=/opt/hostedtoolcache/Python/* -m pytest | |
| - name: Coveralls | |
| uses: AndreMiras/coveralls-python-action@develop | |
| with: | |
| parallel: true | |
| flag-name: Unit Test | |
| coveralls_finish: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Coveralls Finished | |
| uses: AndreMiras/coveralls-python-action@develop | |
| with: | |
| parallel-finished: true |