Remove devcontainer CI pipelines and add SpectraFit lifecycle warnings #6205
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 |