-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (62 loc) · 2.06 KB
/
python-unittest.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
name: UPAC
on:
push:
branches:
- main
- dev
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
name: Test UPAC on ${{ matrix.os }} and Irace from ${{ matrix.r-package-source }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: ["3.8"]
pip-args: ["--upgrade"]
r-version: ["release"]
r-package-source: ["github::MLopez-Ibanez/irace"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
if: ${{ matrix.r-package-source == 'github::MLopez-Ibanez/irace' }}
with:
packages: remotes
pak-version: devel
- name: Install github::MLopez-Ibanez/irace
if: ${{ matrix.r-package-source == 'github::MLopez-Ibanez/irace' }}
run: |
remotes::install_github('MLopez-Ibanez/irace', upgrade = 'never', build = FALSE)
shell: Rscript {0}
- uses: r-lib/actions/setup-r-dependencies@v2
if: ${{ matrix.r-package-source == 'cran::irace' }}
with:
packages: ${{ matrix.r-package-source }}
dependencies: '"hard"'
pak-version: devel
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with unittest
run: |
python -m unittest up_ac/tests/unittests.py
python -m unittest up_ac/tests/test_default_engine_configs.py
python -m unittest up_ac/tests/test_allowed_combinations.py
python -m unittest up_ac/tests/test_enhsp_Irace.py
python -m unittest up_ac/tests/test_fast-downward_Smac.py