-
Notifications
You must be signed in to change notification settings - Fork 41
111 lines (91 loc) · 3.17 KB
/
test-run-nightly.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Test Run Nightly
on:
schedule: # UTC at 0400
- cron: '0 4 * * *'
workflow_dispatch:
env:
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
PYFLUENT_TIMEOUT_FORCE_EXIT: 30
PYFLUENT_LAUNCH_CONTAINER: 1
PYFLUENT_LOGGING: 'DEBUG'
PYFLUENT_WATCHDOG_DEBUG: 'OFF'
PYFLUENT_HIDE_LOG_SECRETS: 1
MAIN_PYTHON_VERSION: '3.10'
jobs:
test:
name: Unit Testing
runs-on: [self-hosted, pyfluent]
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: Python-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
Python-${{ runner.os }}-${{ matrix.python-version }}
- name: Add version information
run: make version-info
- name: Install pyfluent
run: make install
- name: Retrieve PyFluent version
run: |
echo "PYFLUENT_VERSION=$(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)" >> $GITHUB_OUTPUT
echo "PYFLUENT version is: $(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)"
id: version
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ansys-bot
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull 24.2 Fluent docker image
run: make docker-pull
env:
FLUENT_IMAGE_TAG: v24.2.0
- name: Run 24.2 API codegen
run: make api-codegen
env:
FLUENT_IMAGE_TAG: v24.2.0
- name: Pull 25.1 Fluent docker image
run: make docker-pull
env:
FLUENT_IMAGE_TAG: v25.1.0
# The version-independent built-in settings classes are generated only with Fluent 25.1
# which are required for the unit tests
- name: Run 25.1 API codegen
run: make api-codegen
env:
FLUENT_IMAGE_TAG: v25.1.0
- name: Print 24.2 Fluent version info
run: |
cat src/ansys/fluent/core/generated/fluent_version_242.py
python -c "from ansys.fluent.core.generated.solver.settings_242 import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Install again after codegen
run: |
rm -rf dist
make install > /dev/null
- name: 24.2 Unit Testing
run: |
make install-test
make unittest-all-242
env:
FLUENT_IMAGE_TAG: v24.2.0
- name: Cleanup previous docker containers
if: always()
run: make cleanup-previous-docker-containers
- name: Upload 24.2 Coverage Results to Codecov
uses: codecov/codecov-action@v4
with:
root_dir: ${{ github.workspace }}
name: cov_xml.xml
- name: Upload 24.2 Coverage Artifacts
uses: actions/upload-artifact@v4
with:
name: coverage_report
path: ./htmlcov