mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
simplify CI
This commit is contained in:
parent
cc6b7e792c
commit
246c18cc2b
29
.github/workflows/build-and-test.yml
vendored
29
.github/workflows/build-and-test.yml
vendored
@ -1,16 +1,15 @@
|
|||||||
|
|
||||||
name: Unit Tests
|
name: Unit Tests
|
||||||
|
|
||||||
on:
|
on: [pull_request]
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.7", "3.8", "3.9", "3.10"]
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
services:
|
services:
|
||||||
sqldb:
|
sqldb:
|
||||||
@ -25,17 +24,13 @@ jobs:
|
|||||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python 3.10.2
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.10.2
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install pipenv
|
|
||||||
run: pip install pipenv --upgrade
|
|
||||||
- name: Upgrde pip, setuptools and wheel
|
|
||||||
run: pip install --upgrade pip setuptools wheel
|
|
||||||
- name: Install required libs
|
- name: Install required libs
|
||||||
run: pipenv install --system --sequential --ignore-pipfile --dev
|
run: pip install -r requirements.txt
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: pytest
|
run: pytest
|
||||||
env:
|
env:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user