diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 3d87cac2..2ff76ed3 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -73,7 +73,7 @@ jobs: verbose: true emoji: true job-summary: true - custom-arguments: '-v ' + custom-arguments: '-v --ignore=./tests/test_FMIRegression.py' click-to-expand: true report-title: 'Test Report' diff --git a/.github/workflows/Test_v4xx.yml b/.github/workflows/Test_v4xx.yml new file mode 100644 index 00000000..64cc2bd9 --- /dev/null +++ b/.github/workflows/Test_v4xx.yml @@ -0,0 +1,73 @@ +name: Test-v4.x.x + +on: + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + matrix: + # test for: + # * oldest supported version + # * latest available Python version + python-version: ['3.10', '3.14'] + # * Linux using ubuntu-latest + # * Windows using windows-latest + os: ['ubuntu-latest', 'windows-latest'] + # * OM stable - latest stable version + # * OM nightly - latest nightly build + omc-version: ['stable', 'nightly'] + + steps: + - uses: actions/checkout@v6 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + architecture: 'x64' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip build setuptools wheel twine + pip install . pytest pytest-md pytest-emoji pre-commit + + - name: Set timezone + uses: szenius/set-timezone@v2.0 + with: + timezoneLinux: 'Europe/Berlin' + + - name: Run pre-commit linters + run: 'pre-commit run --all-files' + + - name: "Set up OpenModelica Compiler" + uses: OpenModelica/setup-openmodelica@v1.0.6 + with: + version: ${{ matrix.omc-version }} + packages: | + omc + libraries: | + 'Modelica 4.0.0' + - run: "omc --version" + + - name: Pull OpenModelica docker image + if: runner.os != 'Windows' + run: docker pull openmodelica/openmodelica:v1.25.0-minimal + + - name: Build wheel and sdist packages + run: python -m build --wheel --sdist --outdir dist + + - name: Check twine + run: python -m twine check dist/* + + - name: Run pytest + uses: pavelzw/pytest-action@v2 + with: + verbose: true + emoji: true + job-summary: true + custom-arguments: '-v ./tests --ignore=./tests/test_FMIRegression.py' + click-to-expand: true + report-title: 'Test Report'