Merge pull request #308 from scottpaine/feature/mmdftpsf #4
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: CI | |
| permissions: | |
| contents: read # Allow reading repository contents | |
| actions: read # Allow reading workflow artifacts | |
| checks: write # Allow writing check results | |
| pull-requests: write # Allow commenting on PRs | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| lock_file: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup | |
| - run: uv lock --locked | |
| linting: | |
| runs-on: ubuntu-latest | |
| needs: [lock_file] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup | |
| - run: uvx ruff check . | |
| formatting: | |
| runs-on: ubuntu-latest | |
| needs: [lock_file] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup | |
| - run: uvx ruff format --check . | |
| tests: | |
| runs-on: ubuntu-latest | |
| needs: [lock_file] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| uv add --dev pytest pytest-cov codecov torch | |
| - name: Run tests with coverage | |
| run: | | |
| uv run pytest --durations=0 --cov --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: true | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: [linting, formatting, tests] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup | |
| - run: uv build |