Skip to content

Commit 0e54ce6

Browse files
test: Separate mapdl dependant tests
1 parent 6a55b87 commit 0e54ce6

File tree

2 files changed

+47
-7
lines changed

2 files changed

+47
-7
lines changed

.github/workflows/cicd.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,8 @@ jobs:
4343
name: Build and Testing
4444
runs-on: ubuntu-22.04
4545
needs: [smoke-tests]
46-
container:
47-
image: ghcr.io/ansys/pymapdl/mapdl:v22.2-ubuntu
48-
options: "-u=0:0 --entrypoint /bin/bash"
49-
credentials:
50-
username: ${{ secrets.GH_USERNAME }}
51-
password: ${{ secrets.GH_TOKEN }}
5246
env:
53-
ANSYS_LOCAL: true
47+
ANSYS_LOCAL: false
5448
ON_UBUNTU: true
5549

5650
steps:
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: GitHub CI
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
push:
7+
tags:
8+
- "*"
9+
branches:
10+
- main
11+
12+
env:
13+
PACKAGE_NAME: ansys-tools-common
14+
MAIN_PYTHON_VERSION: 3.13
15+
16+
jobs:
17+
build-tests:
18+
name: Build and Testing
19+
runs-on: ubuntu-22.04
20+
container:
21+
image: ghcr.io/ansys/pymapdl/mapdl:v22.2-ubuntu
22+
options: "-u=0:0 --entrypoint /bin/bash"
23+
credentials:
24+
username: ${{ secrets.GH_USERNAME }}
25+
password: ${{ secrets.GH_TOKEN }}
26+
env:
27+
ANSYS_LOCAL: true
28+
ON_UBUNTU: true
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Setup Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
36+
- name: Install library, with test extra
37+
run: python -m pip install .[tests]
38+
39+
- name: Unit testing
40+
run: |
41+
python -m pytest -vx --cov=${{ env.PACKAGE_NAMESPACE }} --cov-report=term --cov-report=xml:.cov/coverage.xml --cov-report=html:.cov/html
42+
43+
- name: Upload coverage reports to Codecov
44+
uses: codecov/codecov-action@v5
45+
with:
46+
files: .cov/coverage.xml

0 commit comments

Comments
 (0)