Skip to content

Commit 6ef0900

Browse files
committed
abc
1 parent f4804c0 commit 6ef0900

34 files changed

Lines changed: 2283 additions & 253 deletions

.github/workflows/Test.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: Test-Publish
22

33
on:
4-
push:
5-
branches: ['master']
6-
tags:
7-
- 'v*' # only publish when pushing version tags (e.g., v1.0.0)
8-
pull_request:
94
workflow_dispatch:
105

116
jobs:
@@ -17,13 +12,13 @@ jobs:
1712
# test for:
1813
# * oldest supported version
1914
# * latest available Python version
20-
python-version: ['3.10', '3.14']
15+
python-version: ['3.14']
2116
# * Linux using ubuntu-latest
2217
# * Windows using windows-latest
2318
os: ['ubuntu-latest', 'windows-latest']
2419
# * OM stable - latest stable version
2520
# * OM nightly - latest nightly build
26-
omc-version: ['stable', 'nightly']
21+
omc-version: ['stable']
2722

2823
steps:
2924
- uses: actions/checkout@v6

.github/workflows/Test_v400.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Test-v4.0.0
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test:
8+
runs-on: ${{ matrix.os }}
9+
timeout-minutes: 30
10+
strategy:
11+
matrix:
12+
python-version: ['3.10', '3.14']
13+
os: ['ubuntu-latest', 'windows-latest']
14+
omc-version: ['stable', 'nightly']
15+
16+
steps:
17+
- uses: actions/checkout@v6
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v6
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
architecture: 'x64'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip build setuptools wheel twine
28+
pip install . pytest pytest-md pytest-emoji pre-commit
29+
30+
- name: Set timezone
31+
uses: szenius/set-timezone@v2.0
32+
with:
33+
timezoneLinux: 'Europe/Berlin'
34+
35+
- name: Run pre-commit linters
36+
run: 'pre-commit run --all-files'
37+
38+
- name: "Set up OpenModelica Compiler"
39+
uses: OpenModelica/setup-openmodelica@v1.0.5
40+
with:
41+
version: ${{ matrix.omc-version }}
42+
packages: |
43+
omc
44+
libraries: |
45+
'Modelica 4.0.0'
46+
- run: "omc --version"
47+
48+
- name: Pull OpenModelica docker image
49+
if: runner.os != 'Windows'
50+
run: docker pull openmodelica/openmodelica:v1.25.0-minimal
51+
52+
- name: Build wheel and sdist packages
53+
run: python -m build --wheel --sdist --outdir dist
54+
55+
- name: Check twine
56+
run: python -m twine check dist/*
57+
58+
- name: Run pytest
59+
uses: pavelzw/pytest-action@v2
60+
with:
61+
verbose: true
62+
emoji: true
63+
job-summary: true
64+
custom-arguments: '-v ./tests_v400 '
65+
click-to-expand: true
66+
report-title: 'Test Report'
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Test-v4.0.0-py310
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test:
8+
runs-on: ${{ matrix.os }}
9+
timeout-minutes: 30
10+
strategy:
11+
matrix:
12+
python-version: ['3.10']
13+
os: ['ubuntu-latest']
14+
omc-version: ['stable']
15+
16+
steps:
17+
- uses: actions/checkout@v6
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v6
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
architecture: 'x64'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip build setuptools wheel twine
28+
pip install . pytest pytest-md pytest-emoji pre-commit
29+
30+
- name: Set timezone
31+
uses: szenius/set-timezone@v2.0
32+
with:
33+
timezoneLinux: 'Europe/Berlin'
34+
35+
- name: Run pre-commit linters
36+
run: 'pre-commit run --all-files'
37+
38+
- name: "Set up OpenModelica Compiler"
39+
uses: OpenModelica/setup-openmodelica@v1.0.5
40+
with:
41+
version: ${{ matrix.omc-version }}
42+
packages: |
43+
omc
44+
libraries: |
45+
'Modelica 4.0.0'
46+
- run: "omc --version"
47+
48+
- name: Pull OpenModelica docker image
49+
if: runner.os != 'Windows'
50+
run: docker pull openmodelica/openmodelica:v1.25.0-minimal
51+
52+
- name: Build wheel and sdist packages
53+
run: python -m build --wheel --sdist --outdir dist
54+
55+
- name: Check twine
56+
run: python -m twine check dist/*
57+
58+
- name: Run pytest
59+
uses: pavelzw/pytest-action@v2
60+
with:
61+
verbose: true
62+
emoji: true
63+
job-summary: true
64+
custom-arguments: '-v ./tests_v400 '
65+
click-to-expand: true
66+
report-title: 'Test Report'

.github/workflows/Test_v4xx.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Test-v4.x.x
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test:
8+
runs-on: ${{ matrix.os }}
9+
timeout-minutes: 30
10+
strategy:
11+
matrix:
12+
python-version: ['3.10', '3.14']
13+
os: ['ubuntu-latest', 'windows-latest']
14+
omc-version: ['stable', 'nightly']
15+
16+
steps:
17+
- uses: actions/checkout@v6
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v6
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
architecture: 'x64'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip build setuptools wheel twine
28+
pip install . pytest pytest-md pytest-emoji pre-commit
29+
30+
- name: Set timezone
31+
uses: szenius/set-timezone@v2.0
32+
with:
33+
timezoneLinux: 'Europe/Berlin'
34+
35+
- name: Run pre-commit linters
36+
run: 'pre-commit run --all-files'
37+
38+
- name: "Set up OpenModelica Compiler"
39+
uses: OpenModelica/setup-openmodelica@v1.0.5
40+
with:
41+
version: ${{ matrix.omc-version }}
42+
packages: |
43+
omc
44+
libraries: |
45+
'Modelica 4.0.0'
46+
- run: "omc --version"
47+
48+
- name: Pull OpenModelica docker image
49+
if: runner.os != 'Windows'
50+
run: docker pull openmodelica/openmodelica:v1.25.0-minimal
51+
52+
- name: Build wheel and sdist packages
53+
run: python -m build --wheel --sdist --outdir dist
54+
55+
- name: Check twine
56+
run: python -m twine check dist/*
57+
58+
- name: Run pytest
59+
uses: pavelzw/pytest-action@v2
60+
with:
61+
verbose: true
62+
emoji: true
63+
job-summary: true
64+
custom-arguments: '-v ./tests '
65+
click-to-expand: true
66+
report-title: 'Test Report'

.pre-commit-config.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ repos:
2828
hooks:
2929
- id: codespell
3030

31-
- repo: https://github.com/pre-commit/mirrors-mypy.git
32-
rev: "v1.15.0"
31+
- repo: https://github.com/pre-commit/mirrors-mypy
32+
rev: v1.9.0
3333
hooks:
3434
- id: mypy
35-
args: []
36-
exclude: tests/
35+
exclude: 'test|test_v400'
3736
additional_dependencies:
3837
- pyparsing
3938
- types-psutil

0 commit comments

Comments
 (0)