Skip to content

test-datalad_crawler-maint #1410

test-datalad_crawler-maint

test-datalad_crawler-maint #1410

# This file is autogenerated from extensions.yaml using scripts/generate.
# See CONTRIBUTING.md for more information
name: test-datalad_crawler-maint
on:
# Trigger the workflow on pull request,
# but only if any given extension workflow was modified
pull_request:
paths:
- '.github/workflows/test-datalad_crawler-maint.yaml'
push:
branches:
- master
paths:
- '.github/workflows/test-datalad_crawler-maint.yaml'
# all should be triggered on cron
schedule:
- cron: '00 02 * * *'
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 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.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- 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_crawler extension from PyPI ([devel,test,tests])
run: |
pip install datalad-crawler[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_crawler tests
run: |
mkdir -p __testhome__
cd __testhome__
python -m pytest -s -v --cov=datalad --cov=datalad_crawler --pyargs datalad_crawler