Skip to content

Nightly test from wheel #424

Nightly test from wheel

Nightly test from wheel #424

Workflow file for this run

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.8', '3.9', '3.10']
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
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: |
git config --global url."https://${{ secrets.PYANSYS_CI_BOT_TOKEN }}@github.com/ansys-internal/ansys-api-acp".insteadOf "https://github.com/ansys-internal/ansys-api-acp"
git config --global url."https://${{ secrets.PYANSYS_CI_BOT_TOKEN }}@github.com/ansys-internal/ansys-tools-filetransfer".insteadOf "https://github.com/ansys-internal/ansys-tools-filetransfer"
git config --global url."https://${{ secrets.PYANSYS_CI_BOT_TOKEN }}@github.com/ansys-internal/ansys-api-tools-filetransfer".insteadOf "https://github.com/ansys-internal/ansys-api-tools-filetransfer"
git config --global url."https://${{ secrets.PYANSYS_CI_BOT_TOKEN }}@github.com/ansys-internal/ansys-tools-local-product-launcher".insteadOf "https://github.com/ansys-internal/ansys-tools-local-product-launcher"
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@v2
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-internal/pyacp:latest'