Skip to content

♻️ use pip-tool to autogenerate dependencies #78

♻️ use pip-tool to autogenerate dependencies

♻️ use pip-tool to autogenerate dependencies #78

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
pull_request: {}
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: pip install -r requirements/pyproject.txt && pip install -r requirements/linting.txt
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --verbose
test:
name: test on python ${{ matrix.python-version }}
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements/all.txt
- name: Test
env:
ENV: test
REDIS_URL: "redis://0.0.0.0:6379"
run: pytest --cov=authx --cov-report=html -xv --color=yes --disable-warnings --cov-fail-under=80
- name: Upload coverage
uses: codecov/codecov-action@v3
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
check:
if: always()
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}