fix: correct spelling of SpectraFit
#6254
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: 🐍 CI - Python Package | |
| on: | |
| push: | |
| branches: [main, feature/*, release/*, hotfix/*] | |
| pull_request: | |
| branches: [main, develop] | |
| repository_dispatch: | |
| types: [create-pull-request] | |
| jobs: | |
| pre-commit: | |
| if: github.repository == 'Anselmoo/spectrafit' | |
| name: 🧹 Pre-commit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🛎️ Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: 🐍 Set up uv for pre-commit | |
| uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| python-version: 3.11 | |
| - name: 💾 Cache pre-commit | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pre-commit- | |
| - name: ✅ Pre-commit run | |
| run: | | |
| uv run pre-commit run --all-files --color=always | |
| build: | |
| if: github.repository == 'Anselmoo/spectrafit' | |
| name: 🏗️ Build & Test Python ${{ matrix.python-version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
| needs: pre-commit | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| arch: [x64] | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: 🛎️ Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: 🐍 Set up Python ${{ matrix.python-version }} | |
| uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| python-version: ${{ matrix.python-version }} | |
| - name: 📦 Install the project | |
| run: uv sync --all-extras --dev | |
| - name: 🧪 Test SpectraFit | |
| run: uv run --group dev --all-extras pytest spectrafit/ | |
| - name: 📊 Codecov | |
| if: ${{ success() && !cancelled() }} | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| with: | |
| name: codecov-umbrella | |
| flags: unittests | |
| verbose: true | |
| env_vars: OS,PYTHON | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| minimal-build: | |
| if: github.repository == 'Anselmoo/spectrafit' | |
| name: 🏗️ Minimal Build | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: 🛎️ Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: 🐍 Install uv | |
| uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| python-version: "3.10" | |
| - name: 📦 Install the project | |
| run: | | |
| uv sync --all-extras | |
| uv run pip install -e . | |
| install-build: | |
| if: github.repository == 'Anselmoo/spectrafit' | |
| name: 🏗️ Install from Wheel | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: 🛎️ Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: 🐍 Install uv | |
| uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| python-version: "3.10" | |
| - name: 🏗️ Setup the project | |
| run: | | |
| uv sync --all-extras | |
| uv build | |
| - name: 📦 Install the wheel | |
| run: | | |
| uv pip install dist/*.whl | |
| uv run spectrafit -v | |
| documentation: | |
| if: github.repository == 'Anselmoo/spectrafit' | |
| name: 📚 Build Documentation | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: 🛎️ Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: 🐍 Install uv and doc dependencies | |
| uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| python-version: "3.10" | |
| - name: 📦 Install the project | |
| run: uv sync --all-extras --group docs | |
| - name: 🛠️ Set git config | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| - name: 🏗️ Build documentation | |
| if: ${{ !contains(github.ref, 'refs/heads/main')}} | |
| run: uv run --group docs --all-extras mkdocs build --clean | |
| - name: 🚀 Deploy documentation develops | |
| if: contains(github.ref, 'refs/heads/main') | |
| run: uv run --group docs --all-extras mike deploy --push --update-aliases develop |