Skip to content

core: improve inferring of metadata #31

core: improve inferring of metadata

core: improve inferring of metadata #31

Workflow file for this run

name: Test python package
on:
push:
paths:
- tests/**
- src/**
- pyproject.toml
- .github/workflows/test.yml
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
backend: ['torch','jax'] # 'tensorflow' is excluded since on github-ci tests get stuck for a yet unknown reason
python-version: ['3.10','3.11','3.12']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install pip
run: python -m pip install -U pip
- name: Install package
run: python -m pip install -e .[dev,test]
# Run keras backend specific tests (for keras>=3)
# Due to space issues avoid creating too many venvs (via tox)
# see https://github.com/actions/runner-images/issues/709
- name: Run tests - ${{ matrix.backend }} backend
run: KERAS_BACKEND=${{ matrix.backend }} pytest -v --timeout=120 --cov=damast --cov-report=term --junitxml=junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.backend }}.xml tests
- name: Upload pytest results
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.backend }}
path: junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.backend }}.xml
# Publish also in case of test failures
if: always()