Skip to content

Merge pull request #387 from capocchi/version-5.1 #57

Merge pull request #387 from capocchi/version-5.1

Merge pull request #387 from capocchi/version-5.1 #57

name: Ubuntu build
on:
push:
branches:
- master
jobs:
build-ubuntu:
runs-on: ubuntu-latest
strategy:
max-parallel: 1 # X Display is not supported on parallel jobs
fail-fast: true # Stop all jobs if one fails
matrix:
python-version: ['3.11','3.12','3.13']
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python with Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: latest
conda-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: anaconda-client-env
python-version: ${{ matrix.python-version }}
- name: Install conda dependencies
run: |
conda install -y -c conda-forge python=${{ matrix.python-version }} wxpython>=4.2.2
conda info -a
conda list
- name: Install dependencies with pip
run: |
python -m pip install --no-cache-dir --prefer-binary \
psutil \
pyYAML \
PyPubSub \
ruamel.yaml \
matplotlib
- name: Install X serveur
run: |
sudo apt-get update
sudo apt-get install -y xvfb libgtk-3-0
### Test of DEVSimPy (open, start simulation during 10 time step and close)
- name: Test DEVSimPy
run: |
xvfb-run -a python devsimpy/devsimpy.py examples/model0/model0.dsp 10 autostart autoclose
### Test of diag and sub frame
- name: Test DEVSimPy Frame and Dialog
run: |
cd tests
FILES=(
test_checkergui.py
test_connectdialog.py
test_detachedframe.py
test_diagramconstantsdialog.py
test_editor.py
test_findgui.py
test_ftpgui.py
test_htmlwindow.py
test_importlibrary.py
test_labelgui.py
test_preferencesgui.py
test_prioritygui.py
test_simulationgui.py
test_wizardgui.py
test_pluginsgui.py
test_wxpymail.py
test_aiprompterdialog.py
test_simpleframeeditor.py
test_yamlexportgui.py
test_spreadsheet.py
test_xmlmodule.py
test_standalonegui.py
)
for file in "${FILES[@]}"; do
xvfb-run -a python "$file" --autoclose
done
### Upload test results
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ubuntu-test-results
path: ./ubuntu-test-results/