-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (44 loc) · 1.37 KB
/
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
name: Nightly test from wheel
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
main:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Create wheel
run: |
pip install poetry
poetry build --format wheel
- name: Install library from wheel, test dependencies from poetry.lock
run: |
python -m venv test_env
. test_env/bin/activate
pip install $(echo dist/*.whl)
poetry config virtualenvs.create false --local
poetry install --only test
- name: Login in Github Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: pyansys-ci-bot
password: ${{ secrets.PYANSYS_CI_BOT_PACKAGE_TOKEN }}
- name: Unit testing
run: |
docker pull $IMAGE_NAME
. test_env/bin/activate
pytest -v --license-server=1055@$LICENSE_SERVER --no-server-log-files tests/unittests
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
IMAGE_NAME: 'ghcr.io/ansys/acp:latest'