-
Notifications
You must be signed in to change notification settings - Fork 17
82 lines (72 loc) · 2.39 KB
/
test.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
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
name: CI
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
ulimit -n 50000
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel pytest
python -m pip install --upgrade virtualenv
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
- name: "Setting up environment"
run: |
export NEGMAS_IGNORE_TEST_NOTEBOOKS=True
export NEGMAS_FASTRUN=True
- name: "Run pytest for ${{ matrix.python-version }}"
run: "python -W ignore -m pytest negmas tests/core || python -W ignore -m pytest --last-failed ."
package:
name: "Build & verify package"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: '3.11'
- name: "Install pep517 and twine"
run: "python -m pip install --upgrade pip setuptools wheel pytest twine"
- name: "Build package"
run: "python setup.py sdist bdist_wheel"
- name: "List result"
run: "ls -l dist"
- name: "Check long_description"
run: "python -m twine check dist/*"
install-dev:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
name: "Verify dev env"
runs-on: "${{ matrix.os }}"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: '3.11'
- name: "Install in dev mode"
run: |
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r docs/requirements.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
- name: "Import package"
run: "python -c 'import negmas; print(negmas.__version__)'"