Skip to content

Commit bcce36a

Browse files
authored
Add a retro-compatibility check (#148)
* Add a retro-compatibility job * Releaser uses build to generate the wheel * Add 222 to retro
1 parent e676a32 commit bcce36a

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

.github/workflows/ci.yml

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,63 @@ jobs:
8888
- name: "Upload coverage to Codecov"
8989
uses: codecov/codecov-action@v3
9090

91+
retro:
92+
name: "Retro-compatibility"
93+
if: startsWith(github.head_ref, 'master') || contains(github.head_ref, 'release') || contains(github.head_ref, 'retro') || startsWith(github.ref, 'refs/tags/v')
94+
runs-on: ${{ matrix.os }}
95+
strategy:
96+
fail-fast: false
97+
matrix:
98+
python-version: ["3.7"]
99+
os: ["windows-latest", "ubuntu-latest"]
100+
ANSYS_VERSION: ["222", "221"]
101+
102+
steps:
103+
- uses: actions/checkout@v3
104+
105+
- name: "Build Package"
106+
uses: pyansys/pydpf-actions/build_package@feat/use_build
107+
with:
108+
python-version: ${{ matrix.python-version }}
109+
ANSYS_VERSION: ${{env.ANSYS_VERSION}}
110+
PACKAGE_NAME: ${{env.PACKAGE_NAME}}
111+
MODULE: ${{env.MODULE}}
112+
dpf-standalone-TOKEN: ${{secrets.DPF_PIPELINE}}
113+
install_extras: plotting
114+
wheel: false
115+
extra-pip-args: ${{ env.extra }}
116+
117+
- name: "Install ansys-grpc-dpf==0.4.0"
118+
shell: bash
119+
run: |
120+
pip install ansys-grpc-dpf==0.4.0
121+
if: matrix.ANSYS_VERSION == '221'
122+
123+
- name: "Prepare Testing Environment"
124+
uses: pyansys/pydpf-actions/prepare_tests@feat/use_build
125+
with:
126+
DEBUG: true
127+
128+
- name: "Test API"
129+
shell: bash
130+
working-directory: tests
131+
run: |
132+
pytest $DEBUG --cov=ansys.dpf.${{env.MODULE}} --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=junit/test-results.xml --reruns 2 .
133+
134+
- name: "Kill all servers"
135+
uses: pyansys/pydpf-actions/kill-dpf-servers@feat/use_build
136+
if: always()
137+
138+
- name: "Upload Test Results"
139+
uses: actions/upload-artifact@v3
140+
with:
141+
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ env.ANSYS_VERSION }}
142+
path: tests/junit/test-results.xml
143+
if: always()
144+
145+
- name: "Upload coverage to Codecov"
146+
uses: codecov/codecov-action@v3
147+
91148
docs:
92149
name: Documentation
93150
runs-on: ubuntu-latest
@@ -111,7 +168,7 @@ jobs:
111168
draft_release:
112169
name: "Draft release"
113170
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
114-
needs: [style, build_test, docs]
171+
needs: [style, build_test, retro, docs]
115172
runs-on: ubuntu-latest
116173
steps:
117174
- name: "Set up Python"

0 commit comments

Comments
 (0)