Skip to content

Spectrum feature generator #489

Spectrum feature generator

Spectrum feature generator #489

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
test-python-package:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff
run: ruff check --output-format=github .
- name: Build and install ms2rescore package
run: |
pip install --only-binary :all: .[dev]
- name: Test with pytest
run: |
pytest
- name: Test installation
run: |
ms2rescore --help
test-windows-installer:
# Only run on push to main (e.g., after PR merge)
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install package and dependencies
run: |
python -m pip install --upgrade pip
pip install --only-binary :all: .[ionmob] pyinstaller
- name: Install Inno Setup
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install innosetup -y --allow-unofficial --force
- name: Run pyinstaller
run: pyinstaller ./ms2rescore.spec --clean --noconfirm
- name: Test built exe
run: dist/ms2rescore/ms2rescore.exe
- name: Run Inno Setup
run: ISCC.exe ./ms2rescore_innosetup.iss /DAppVersion=${{ github.ref_name }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.exe