Skip to content

Merge pull request #182 from levitsky/fix/col_order #319

Merge pull request #182 from levitsky/fix/col_order

Merge pull request #182 from levitsky/fix/col_order #319

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Continuous integration Unit tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
PythonBlack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Set up the specific Python version for Black
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12 # Set your desired Python version here
# Install Black and dependencies if necessary
- name: Install Black
run: |
python -m pip install --upgrade pip
pip install black
# Run Black linting
- name: Check code lints with Black
run: black . --check
# If the above check failed, post a comment on the PR explaining the failure
- name: Post PR comment
if: failure()
uses: mshick/add-pr-comment@v1
with:
message: |
## Python linting (`black`) is failing
To keep the code consistent with lots of contributors, we run automated code consistency checks.
To fix this CI test, please run:
* Install [`black`](https://black.readthedocs.io/en/stable/): `pip install black`
* Fix formatting errors in your pipeline: `black .`
Once you push these changes the test should pass, and you can hide this comment :+1:
We highly recommend setting up Black in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help!
Thanks again for your contribution!
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false
isort:
runs-on: ubuntu-latest
steps:
- name: Check out source-code repository
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: python-isort
uses: isort/[email protected]
with:
isortVersion: "latest"
requirementsFiles: "requirements.txt requirements-dev.txt"
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
- name: Install package
run: python setup.py install
- name: Test OpenMS converter
run: |
python -m pytest tests