Skip to content

Add tests for windows and mac #5

Add tests for windows and mac

Add tests for windows and mac #5

Workflow file for this run

name: Complete tests
on:
workflow_dispatch:
schedule:
- cron: "0 12 * * 0" # Weekly on Sunday at noon UTC
pull_request:
types: [synchronize, opened, reopened]
branches:
- main
env:
KACHERY_CLOUD_CLIENT_ID: ${{ secrets.KACHERY_CLOUD_CLIENT_ID }}
KACHERY_CLOUD_PRIVATE_KEY: ${{ secrets.KACHERY_CLOUD_PRIVATE_KEY }}
jobs:
run:
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-13, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install packages
run: |
git config --global user.email "[email protected]"
git config --global user.name "CI Almighty"
python -m pip install -U pip # Official recommended way
pip install -e .[test,extractors,streaming_extractors,full]
shell: bash
- name: Installad datalad
run: |
pip install datalad-installer
if [ ${{ runner.os }} = 'Linux' ]; then
datalad-installer --sudo ok git-annex --method datalad/packages
elif [ ${{ runner.os }} = 'macOS' ]; then
datalad-installer --sudo ok git-annex --method brew
elif [ ${{ runner.os }} = 'Windows' ]; then
datalad-installer --sudo ok git-annex --method datalad/git-annex:release
fi
pip install datalad
git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency
shell: bash
- name: Installad datalad on Linux
if: runner.os == 'Linux'
run: |
pip install datalad-installer
datalad-installer --sudo ok git-annex --method datalad/packages
pip install datalad
git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency
- name: Install datalad on Windows
if: runner.os == 'Windows'
run: |
pip install datalad-installer
datalad-installer --sudo ok git-annex --method datalad/git-annex:release
pip install datalad
git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency
- name: Install datalad on Mac
if: runner.os == 'macOS'
run: |
pip install datalad-installer
datalad-installer --sudo ok git-annex --method brew
pip install datalad
git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency
- name: run tests
env:
HDF5_PLUGIN_PATH: ${{ github.workspace }}/hdf5_plugin_path_maxwell
run: |
source ${{ github.workspace }}/test_env/bin/activate
pytest -m "not sorters_external" --cov=./ --cov-report xml:./coverage.xml -vv -ra --durations=0 | tee report_full.txt; test ${PIPESTATUS[0]} -eq 0 || exit 1
echo "# Timing profile of full tests" >> $GITHUB_STEP_SUMMARY
pip install tabulate
python ./.github/build_job_summary.py report_full.txt >> $GITHUB_STEP_SUMMARY
cat $GITHUB_STEP_SUMMARY
rm report_full.txt