-
Notifications
You must be signed in to change notification settings - Fork 15
52 lines (49 loc) · 1.73 KB
/
builds.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
45
46
47
48
49
50
51
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies for Python 3.11
# we do *not* install the dedupe extra because its dependency on PyLBFGS requires an older version
# of Cython that is not available in python 3.11
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' && matrix.python-version == '3.11'
run: poetry install --no-interaction --no-root -E allegro -E brickify -E web -E orm -E reasonable -E persistence -E bacnet -E networkx
- name: Install all dependencies for other Python versions
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' && matrix.python-version != '3.11'
run: poetry install --no-interaction --no-root --all-extras
- name: Run tests
run: |
source .venv/bin/activate
pytest -s -vvvv