Skip to content

Bump redis & fakeredis to latest #35

Bump redis & fakeredis to latest

Bump redis & fakeredis to latest #35

Workflow file for this run

name: Lint & Test
on:
push:
branches:
- main
pull_request:
jobs:
lint_test:
runs-on: ubuntu-latest
env:
PIP_NO_CACHE_DIR: false
PIP_USER: 1 # Make installed packages go to the custom PYTHONUSERBASE for caching.
PIPENV_HIDE_EMOJIS: 1
PIPENV_IGNORE_VIRTUALENVS: 1
PIPENV_NOSPIN: 1
PYTHONUSERBASE: ${{ github.workspace }}/.cache/py-user-base
steps:
- uses: actions/checkout@v4
- name: Set up Python
id: python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Restore Python environment
id: pycache
uses: actions/cache@v3
with:
path: ${{ env.PYTHONUSERBASE }}
key: "${{ runner.os }}-\
python-\
${{ steps.python.outputs.python-version }}-\
${{ hashFiles('Pipfile') }}-\
${{ hashFiles('Pipfile.lock') }}"
# Don't restore on a different (older) Python version cause I'm unsure if it's safe.
restore-keys: "${{ runner.os }}-\
python-\
${{ steps.python.outputs.python-version }}-\
${{ hashFiles('Pipfile') }}"
- name: Prepend PATH
run: echo '${{ env.PYTHONUSERBASE }}/bin' >> $GITHUB_PATH
- name: Install pipenv
run: pip install pipenv
if: ${{ success() && steps.pycache.outputs.cache-hit != 'true' }}
- name: Install dependencies using pipenv
run: pipenv install --dev --deploy --system
if: ${{ success() && steps.pycache.outputs.cache-hit != 'true' }}
- name: Run flake8
run: python -m flake8
- name: Run unittest
run: |
python -m coverage run -m unittest
python -m coverage report -m
# This step will publish the coverage reports coveralls.io and
# print a "job" link in the output of the GitHub Action
- name: Publish coverage report to coveralls.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python -m coveralls