mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
speed up ci build and test
This commit is contained in:
parent
fbf2b339ad
commit
0e13625df0
24
.github/workflows/build-and-test.yml
vendored
24
.github/workflows/build-and-test.yml
vendored
@ -1,16 +1,15 @@
|
||||
name: Continuous Disaster...
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
name: CI
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
test:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [ "3.11" ]
|
||||
fail-fast: false
|
||||
poetry-version: [ "1.4.0" ]
|
||||
|
||||
env:
|
||||
PYTHONDONTWRITEBYTECODE: 1
|
||||
@ -37,18 +36,13 @@ jobs:
|
||||
- name: Create database schema
|
||||
run: PGPASSWORD=secret psql -h 127.0.0.1 -d testdb -U app-user -c "CREATE SCHEMA shakespeare; CREATE SCHEMA happy_hog;"
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
- name: Load cached venv
|
||||
id: cached-poetry-dependencies
|
||||
uses: actions/cache@v3
|
||||
uses: abatilo/actions-poetry@v2
|
||||
with:
|
||||
path: .venv
|
||||
key: venv-${{ runner.os }}-3.11-${{ hashFiles('**/poetry.lock') }}
|
||||
poetry-version: ${{ matrix.poetry-version }}
|
||||
- name: Install dependencies
|
||||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
||||
run: poetry install --no-interaction --no-root
|
||||
|
Loading…
x
Reference in New Issue
Block a user