Nightly test from wheel #828
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.9', '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' |