Skip to content

Commit 0e0d1ac

Browse files
committed
ci: avoid using pytest actions
1 parent 7e6e492 commit 0e0d1ac

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

.github/workflows/cicd.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,25 @@ jobs:
8989
ANSYS_LOCAL: false
9090
ON_UBUNTU: true
9191
steps:
92-
- uses: ansys/actions/tests-pytest@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
92+
- name: Checkout repository
93+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
94+
95+
- name: Set up uv
96+
uses: astral-sh/setup-uv@eb1897b8dc4b5d5bfe39a428a8f2304605e0983c # 7.0.0
9397
with:
94-
group-dependencies-name: tests
95-
# uv pip install tests/launcher/pkg_with_entrypoint
98+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
99+
100+
- name: Install project dependencies
101+
run: |
102+
uv sync --group tests
103+
104+
- name: Install test package containing entrypoint
105+
run: |
106+
uv pip install tests/launcher/pkg_with_entrypoint
107+
108+
- name: Run tests
109+
run: |
110+
uv run pytest
96111
97112
doc-build:
98113
name: Build documentation

.github/workflows/run_mapdl_tests.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ permissions:
2020

2121
jobs:
2222
build-tests:
23-
name: Build tests
24-
runs-on: ubuntu-22.04
23+
runs-on: ubuntu-latest
2524
container:
2625
image: ghcr.io/ansys/mapdl:v22.2-ubuntu@sha256:024c587f4a8190e99cc3f08a2dc231583032e784a8ef7d7659f8dd9748116697
2726
options: "-u=0:0 --entrypoint /bin/bash"
@@ -40,22 +39,19 @@ jobs:
4039
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4140
with:
4241
python-version: ${{ env.MAIN_PYTHON_VERSION }}
43-
- name: Install uv and create venv
44-
run: |
45-
python -m pip install --upgrade pip
46-
pip install uv
42+
4743
- name: Install project dependencies
4844
run: |
49-
uv sync --extra tests
45+
uv sync --group tests
46+
47+
- name: Install test package containing entrypoint
48+
run: |
49+
uv pip install tests/launcher/pkg_with_entrypoint
50+
5051
- name: Run tests
5152
env:
5253
PACKAGE_NAMESPACE: ${{ env.PACKAGE_NAMESPACE }}
5354
run: |
54-
uv sync --extra tests --no-dev
55-
uv pip install tests/launcher/pkg_with_entrypoint
56-
uv run pytest -vx --cov=${PACKAGE_NAMESPACE} --cov-report=term --cov-report=xml:.cov/coverage.xml --cov-report=html:.cov/html
57-
58-
# - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
59-
# name: 'Upload coverage to CodeCov'
60-
# with:
61-
# token: ${{ secrets.CODECOV_TOKEN }}
55+
uv run pytest \
56+
-vx \
57+
--cov=${{ env.PACKAGE_NAMESPACE }} --cov-report=term --cov-report=xml:.cov/coverage.xml --cov-report=html:.cov/html

0 commit comments

Comments
 (0)