CI run unittests #12
Workflow file for this run
This file contains hidden or 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: Unit tests | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| fail-fast: false | |
| steps: | |
| # Check out the repository. | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # Set up the specified Python version. | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # - name: cache | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: . | |
| # key: test_env_${{ matrix.python-version }} | |
| # ToDo: cuda dedicated needed? or enough via torch? | |
| # - uses: Jimver/cuda-toolkit@v0.2.21 | |
| # id: cuda-toolkit | |
| # with: | |
| # cuda: '12.1.0' | |
| # use-github-cache: false | |
| # use-local-cache: false | |
| # Upgrade pip and install your package (and its dependencies from pyproject.toml). | |
| - name: Install package and dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # This command will build and install your package. | |
| pip install . | |
| # Run tests with pytest. | |
| - name: Run tests | |
| run: | | |
| pytest test |