Skip to content

Update README.md to explain how to use hashids as slugs (#35) #46

Update README.md to explain how to use hashids as slugs (#35)

Update README.md to explain how to use hashids as slugs (#35) #46

Workflow file for this run

name: test-pg
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-pg:
runs-on: ubuntu-20.04
strategy:
max-parallel: 4
matrix:
python-version: [3.9]
django-version: [1.11.29, 2.2.13, 3.0.7, 3.1.2, 3.2.4]
include:
- python-version: "3.10"
django-version: "4.0.4"
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_HOST: 127.0.0.1
TEST_WITH_PG: true
services:
postgres:
image: postgres
ports: ['5432:5432']
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install tooling
run: |
python -mpip install poetry codecov
- name: Install psycopg2
run: |
poetry add psycopg2-binary
- name: Install dependencies
run: |
poetry install
- name: Setup Django ${{ matrix.django-version }}
run: |
poetry run pip install django==${{ matrix.django-version }}
- name: Lint with flake
run: |
poetry run flake8 django_hashids
- name: Test with pytest
run: |
poetry run py.test --cov=./django_hashids/ --no-migrations
- name: Upload coverage to codecov
run: |
codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}