Skip to content

Tests pipeline

Tests pipeline #5

Workflow file for this run

# This file will be used when creating PRs to the develop branch.
# It should run the tests without building the docker images.
name: CI
on:
pull_request:
branches: [develop] # If more branches are needed, add them here.
types: [synchronize, opened, reopened, ready_for_review]
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Cache PDM packages
uses: actions/cache@v4
with:
path: __pypackages__
key: ${{ runner.os }}-pdm-${{ hashFiles('pdm.lock') }}
restore-keys: |
${{ runner.os }}-pdm-
- name: Install dependencies
run: |
python -m pip install pdm
pdm install
ls -la ./
- name: Start db
run: docker compose run --rm -d db
- name: Wait for db
run: |
for i in {1..30}; do
nc -zv localhost 5432 && break
sleep 1
done
- name: Run tests
run: pdm run pytest