forked from IDAES/examples-pse
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (69 loc) · 1.95 KB
/
main.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
name: Run examples
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
examples:
name: Build examples (py${{ matrix.python-version }}/${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
# if fail-fast == true (the default), jobs for the remaining values in the matrix are cancelled
fail-fast: false
matrix:
python-version:
- '3.6'
- '3.7'
os:
- ubuntu-18.04
- windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install own dependencies
run: |
echo $PWD
ls -lh .
python -m pip install --progress-bar=off -r requirements.txt
- name: Install IDAES
run: |
python -m pip install --progress-bar=off git+https://github.com/idaes/idaes-pse
idaes --version
- name: Install IDAES extensions
run: |
idaes get-extensions --verbose
# NOTE: these commands are Unix-shell specific
# and will need to be changed if we want to test on CMD.exe/Powershell
find $(idaes data-directory) -ls
# add bin directory to $PATH (only valid for subsequent steps)
echo "$(idaes bin-directory)" >> $GITHUB_PATH
- name: Test access to executables
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
ipopt.exe -v
else
ipopt -v
fi
- name: Run non-integration tests
run: |
pytest --verbose -m "not integration" tests/
- name: Save Sphinx build artifacts
uses: actions/upload-artifact@v2
with:
name: sphinx-errors
path: sphinx-errors.txt
- name: Save test build artifacts
uses: actions/upload-artifact@v2
with:
name: test-errors
path: ci-test-errors.txt