fix: decimer to work on low res images #284
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: test | |
on: | |
pull_request: | |
branches: [main, development] | |
paths-ignore: | |
- 'CHANGELOG.md' | |
- 'package.json' | |
- 'package-lock.json' | |
push: | |
branches: [main, development] | |
paths-ignore: | |
- 'CHANGELOG.md' | |
- 'package.json' | |
- 'package-lock.json' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
# Get the source code | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Setup Python environment with caching | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
# Debug environment variables | |
- name: Print all environment variables | |
run: printenv | |
# Install all required dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip3 install --upgrade setuptools pip | |
pip3 install --no-cache-dir -r requirements.txt | |
pip install git+https://github.com/Kohulan/DECIMER-Image-Segmentation.git@bbox --no-deps | |
pip3 install --no-deps decimer | |
pip install flake8 pytest | |
pip install pytest-cov | |
wget -O surge "https://github.com/StructureGenerator/surge/releases/download/v1.0/surge-linux-v1.0" | |
chmod +x surge | |
sudo mv surge /usr/bin | |
# Run code quality checks | |
- name: Analysing the code with pylint | |
run: | | |
flake8 --per-file-ignores="__init__.py:F401" --ignore E402,E501,W503 $(git ls-files '*.py') . | |
# Execute tests with coverage | |
- name: Run tests and collect coverage | |
run: | | |
python3 -m pytest --cov=./ --cov-report=xml | |
# Upload coverage data to Codecov | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
file: ./coverage.xml | |
fail_ci_if_error: true | |
flags: service | |
name: codecov-umbrella | |
verbose: true |