-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (41 loc) · 1.26 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
42
43
44
# This file contains checks to run unit tests.
#
# Special thank you to pylint-dev project at GitHub where inspiration
# was taken.
name: Unit tests
on:
pull_request:
branches:
- main
push:
jobs:
tests-linux:
name: Linux / Python ${{ matrix.python-version }} / Postgres ${{ matrix.postgres-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
postgres-version: ["14", "15"]
timeout-minutes: 25
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
check-latest: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then
pip install -r requirements.txt
else
echo "No requirements.txt file found"
fi
- name: Run PyTest
env:
TEST_CONTAINER_TIMESCALE: timescale/timescaledb:latest-pg${{ matrix.postgres-version }}
TEST_CONTAINER_POSTGRES: postgres:${{ matrix.postgres-version }}
run: python -m pytest