Repository navigation
74 lines (61 loc) · 2.1 KB
/
Copy pathci.yml
File metadata and controls
74 lines (61 loc) · 2.1 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
name: CI
# Installs OpenMuscle the way a user does (from a built wheel, not an editable
# clone), runs the unit tests against that installed copy, then runs the
# data-flow smoke test (scripts/ci_smoke.py): web server + rehearsal simulator +
# a recording, the second-window refusal, the launcher scripts, and the browser
# files inside the wheel. Windows and macOS are here because nobody can test
# those by hand on every change.
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.os }}, Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: ["3.11", "3.13"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: pip
cache-dependency-path: pc/pyproject.toml
# Some of the unit tests run the page scripts under Node.
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Build the wheel
run: |
python -m pip install --upgrade pip
python -m pip wheel --no-deps --wheel-dir wheelhouse ./pc
- name: Install from the wheel
run: python -m pip install wheelhouse/openmuscle-*.whl pytest
- name: Unit tests
working-directory: pc
run: python -m pytest -q -p no:cacheprovider
- name: Install and data-flow smoke test
run: >
python scripts/ci_smoke.py --installed --wheel wheelhouse
--work-dir smoke-work
--port 8765 --udp-port 53765 --announce-port 53764
- name: Keep the server and simulator logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: smoke-logs-${{ matrix.os }}-py${{ matrix.python }}
path: smoke-work/*.log
if-no-files-found: ignore