Skip to content

TEMP: try 3.12

TEMP: try 3.12 #811

# This file is autogenerated from extensions.yaml using scripts/generate.
# See CONTRIBUTING.md for more information
name: test-datalad_catalog-maint
on:
# Trigger the workflow on pull request,
# but only if any given extension workflow was modified
pull_request:
paths:
- '.github/workflows/test-datalad_catalog-maint.yaml'
push:
branches:
- master
paths:
- '.github/workflows/test-datalad_catalog-maint.yaml'
# all should be triggered on cron
schedule:
- cron: '50 01 * * *'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# name mimics the one in .travis.yml for datalad build introduced in
# https://github.com/datalad/datalad/pull/4640
annex-install-scenario: [neurodebian, datalad-git-annex-latest]
datalad-install-scenario: [plain]
include:
- annex-install-scenario: neurodebian
datalad-install-scenario: with-datalad-next-release
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up system
shell: bash
run: |
bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
sudo apt-get update -qq
sudo apt-get install eatmydata python3-pip
sudo python3 -m pip config set global.break-system-packages true
sudo pip install datalad-installer
# just not to change the name from what we had already
case "${{ matrix.annex-install-scenario }}" in
neurodebian)
method=neurodebian;;
datalad-git-annex-latest)
method=datalad/git-annex;;
*)
echo "Unknown scenario ${{ matrix.annex-install-scenario }}" >&2
exit 1
esac
GITHUB_TOKEN=${{ secrets.datalad_github_token }} eatmydata \
datalad-installer --sudo ok git-annex -m "${method}"
- name: Set up environment
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Almighty"
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install DataLad (maint)
run: |
python -m pip install --upgrade pip
pip install https://github.com/datalad/datalad/archive/maint.zip
- name: Install datalad-next
if: matrix.datalad-install-scenario == 'with-datalad-next-release'
run: |
pip install datalad-next
git config --global --add datalad.extensions.load next
- name: Install datalad_catalog extension from PyPI ([devel,test,tests])
run: |
pip install datalad-catalog[devel,test,tests]
- name: Install nose et al (just in case!)
# Note, that we need nose even in case of pytest, due to test helpers
# depending on it.
run: |
pip install pytest pytest-cov pytest-xdist nose vcrpy mock coverage
- name: WTF!?
run: |
datalad wtf
- name: datalad_catalog tests
run: |
mkdir -p __testhome__
cd __testhome__
python -m pytest -s -v --cov=datalad --cov=datalad_catalog --pyargs datalad_catalog