Skip to content

Nightly

Nightly #178

Workflow file for this run

name: Nightly
on:
workflow_dispatch:
schedule: # UTC at 0300
- cron: '0 3 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
testing:
name: Testing and coverage
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Installing OS packages
shell: bash
run: |
sudo apt-get update
sudo apt install -y libgl1 libglx-mesa0 xvfb libgomp1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}
- name: Create Python virtual environment
run: |
python -m venv .venv
source .venv/bin/activate
python -c "import sys; print(sys.executable)"
- name: Install packages for testing
run: |
. .venv/bin/activate
python -m pip install --upgrade pip
pip install --upgrade build wheel
pip install .[tests]
- name: Login to GitHub Packages
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io/ansys
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Start container
env:
ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }}
run: |
docker run --detach --name speos-rpc -p 50098:50098 -e SPEOS_LOG_LEVEL=2 -e ANSYSLMD_LICENSE_FILE=${{ env.ANSYSLMD_LICENSE_FILE }} -v "${{ github.workspace }}/tests/assets:/app/assets" --entrypoint /app/SpeosRPC_Server.x ghcr.io/ansys/speos-rpc:dev -m 25000000
- name: Run pytest
run: |
. .venv/bin/activate
xvfb-run pytest -xs
- name: Upload Coverage Results
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: .cov/html
name: coverage-html-ubuntu-${{ matrix.python-version }}
retention-days: 7
- name: Upload coverage to Codecov
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: .cov/xml
name: coverage-html-ubuntu-${{ matrix.python-version }}
- name: Stop container
run: |
docker kill speos-rpc
docker rm speos-rpc