Skip to content

Simplify windows test script #501

Simplify windows test script

Simplify windows test script #501

Workflow file for this run

name: CI
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
build:
strategy:
matrix:
platform: [windows-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('docs/requirements.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade --upgrade-strategy eager pip
pip install flake8
pip install coverage
pip install -r requirements.txt
pip install -r docs/requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --show-source --statistics --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- name: Test with unittest
env:
HED_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coverage run -m unittest
- name: Run spec_test coverage
env:
HED_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coverage run --append -m unittest spec_tests/test_errors.py
continue-on-error: true
- name: Archive code coverage results
if: ${{matrix.python-version == '3.9'}}
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: .coverage