Skip to content

test-datalad_dataverse-maint #186

test-datalad_dataverse-maint

test-datalad_dataverse-maint #186

# This file is autogenerated from extensions.yaml using scripts/generate.
# See CONTRIBUTING.md for more information
name: test-datalad_dataverse-maint
on:
# Trigger the workflow on pull request,
# but only if any given extension workflow was modified
pull_request:
paths:
- '.github/workflows/test-datalad_dataverse-maint.yaml'
push:
branches:
- master
paths:
- '.github/workflows/test-datalad_dataverse-maint.yaml'
# all should be triggered on cron
schedule:
- cron: '25 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]
fail-fast: false
steps:
- uses: actions/checkout@v3
- 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.7
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Install DataLad (maint)
run: |
python -m pip install --upgrade pip
pip install https://github.com/datalad/datalad/archive/maint.zip
- name: Install datalad_dataverse extension from PyPI ([devel,test,tests])
run: |
pip install datalad-dataverse[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_dataverse tests
run: |
mkdir -p __testhome__
cd __testhome__
python -m pytest -s -v --cov=datalad --cov=datalad_dataverse --pyargs datalad_dataverse