-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (39 loc) · 1.14 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Analyse code with ruff
run: |
ruff suppgram
- name: Analyse code with mypy
run: |
mypy suppgram
- name: Build docs
run: |
mkdocs build
- name: Pull MongoDB
run: |
docker pull mongo:latest
- name: Pull PostgreSQL
run: |
docker pull postgres:latest
- name: Run tests
# TODO properly wait until postgres is ready https://stackoverflow.com/a/55835081/999858
run: |
docker run -p 5432:5432 -e POSTGRES_USER=suppgram -e POSTGRES_PASSWORD=test -e POSTGRES_DB=suppgram_test -d postgres:latest
docker run -p 27017:27017 -d mongo:latest
PYTHONPATH=. pytest .