Skip to content

re-enabled file size check when reading binary files #6

re-enabled file size check when reading binary files

re-enabled file size check when reading binary files #6

Workflow file for this run

name: CI
on:
push:
branches: [ master, dev, "dev_JV" ]
pull_request:
branches: [ master ]
jobs:
# ------------------------------------------------------------
# 1) INSTALL-ONLY MATRIX
# ------------------------------------------------------------
install:
name: Install check (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and build tools
run: python -m pip install --upgrade pip setuptools wheel build
- name: Install brukerapi (no tests)
run: |
git clone https://github.com/isi-nmr/brukerapi-python.git
cd brukerapi-python
pip install -e . --use-pep517
# ------------------------------------------------------------
# 2) FULL TEST JOB
# ------------------------------------------------------------
test:
name: Full tests (Python 3.13)
runs-on: ubuntu-latest
needs: install
strategy:
matrix:
python-version: ["3.13"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and build tools
run: python -m pip install --upgrade pip setuptools wheel build
- name: Install brukerapi with dev dependencies
run: |
git clone https://github.com/isi-nmr/brukerapi-python.git
cd brukerapi-python
pip install pytest zenodo_get pytest-cov
pip install -e .[dev] --use-pep517
- name: Cache Zenodo data
uses: actions/cache@v3
with:
path: test/zenodo_zips
key: zenodo-4522220
- name: Run all dataset tests
run: |
python -m pytest test -v --cov=brukerapi --cov-branch --cov-report=xml --cov-report=term-missing --cov-report=html
- name: Upload coverage HTML
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/
- name: Print total coverage
run: |
echo "Total coverage:"
python - <<EOF
import xml.etree.ElementTree as ET
tree = ET.parse('coverage.xml')
root = tree.getroot()
line_rate = float(root.attrib['line-rate']) * 100
print(f"{line_rate:.2f}%")
EOF