Skip to content

ci: replace compose with psql service container #43

ci: replace compose with psql service container

ci: replace compose with psql service container #43

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.7"
- run: python3 -m pip install mypy
- name: Check typing
run: mypy --pretty .
- name: Check formatting
uses: chartboost/ruff-action@v1
with:
args: check --target-version=py37
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
experimental: [false]
include:
- python-version: "3.12"
experimental: true
services:
postgres:
image: postgres:alpine
env:
POSTGRES_PASSWORD: "password"
POSTGRES_DB: "casbin_rule"
options: >-
--health-cmd "pg_isready"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: ${{ matrix.python-version }}
cache: true
- name: Install dependencies
run: pdm install -G :all
- name: Run tests
run: pdm run pytest