-
Notifications
You must be signed in to change notification settings - Fork 8
113 lines (93 loc) · 3.48 KB
/
tests.yml
File metadata and controls
113 lines (93 loc) · 3.48 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Tests
on:
pull_request:
push:
branches:
- main
- master
jobs:
tests-py311:
runs-on: ubuntu-latest
steps:
- name: Checkout destral
uses: actions/checkout@v4
- name: Checkout ERP repository
uses: actions/checkout@v4
with:
repository: gisce/erp
token: ${{ secrets.RO_GITHUB_ACTIONS_REPOS }}
path: erp
- name: Checkout oorq repository
uses: actions/checkout@v4
with:
repository: gisce/oorq
token: ${{ secrets.RO_GITHUB_ACTIONS_REPOS }}
path: oorq
- name: Configure PYTHONPATH
run: echo "PYTHONPATH=$(pwd):$(pwd)/erp/server/bin" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Upgrade packaging tooling
run: |
python -m pip install -U pip wheel
python -m pip install -U "setuptools<82.0.0"
- name: Install project dependencies
run: |
python -m pip install -e .
python -m pip install -r requirements-dev.txt
python -m pip install -r erp/requirements.txt
python -m pip install -r erp/server/bin/msgpackapi/requirements.txt
python -m pip install -r erp/server/bin/restapi/requirements.txt
python -m pip install -r erp/server/bin/addons/base/requirements.txt
python -m pip install -r oorq/requirements.txt
- name: Add user base scripts to PATH
run: echo "${HOME}/.local/bin" >> "${GITHUB_PATH}"
- name: Run unit tests
run: python -m unittest discover tests
- name: Run specs
run: mamba spec
tests-py27:
runs-on: ubuntu-latest
container: python:2.7-slim
steps:
- name: Install system dependencies
run: |
set -eux
sed -i 's|deb.debian.org|archive.debian.org|g; s|security.debian.org|archive.debian.org|g' /etc/apt/sources.list
sed -i '/buster-updates/d' /etc/apt/sources.list
apt-get -o Acquire::Check-Valid-Until=false update
apt-get install -y --no-install-recommends git ca-certificates build-essential python-dev libpq-dev
rm -rf /var/lib/apt/lists/*
- name: Checkout destral
uses: actions/checkout@v4
- name: Checkout ERP repository
uses: actions/checkout@v4
with:
repository: gisce/erp
token: ${{ secrets.RO_GITHUB_ACTIONS_REPOS }}
path: erp
- name: Checkout oorq repository
uses: actions/checkout@v4
with:
repository: gisce/oorq
token: ${{ secrets.RO_GITHUB_ACTIONS_REPOS }}
path: oorq
- name: Configure PYTHONPATH
run: echo "PYTHONPATH=$(pwd):$(pwd)/erp/server/bin" >> $GITHUB_ENV
- name: Prepare pip tooling
run: python -m pip install --upgrade "pip<21" "setuptools<45" wheel
- name: Install project dependencies
run: |
python -m pip install -e .
python -m pip install -r requirements-dev.txt
python -m pip install -r erp/requirements.txt
python -m pip install -r erp/server/bin/msgpackapi/requirements.txt
python -m pip install -r erp/server/bin/restapi/requirements.txt
python -m pip install -r erp/server/bin/addons/base/requirements.txt
python -m pip install -r oorq/requirements.txt
- name: Run unit tests
run: python -m unittest discover tests
- name: Run specs
run: mamba spec