Add tutorial #160
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| NO_ET: 1 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - python: "3.9" | |
| install_datalad: datalad | |
| # install_condor: condor | |
| # TODO 20.04 may be needed for condor | |
| os: ubuntu-22.04 | |
| reproman_tests_deps: full | |
| reproman_tests_ssh: ssh | |
| reproman_tests_assume_ssp: ssp | |
| setup_slurm: slurm | |
| - python: "3.10" | |
| os: ubuntu-22.04 | |
| # By default no logs will be output. This one is to test | |
| # with low level but dumped to /dev/null | |
| reproman_loglevel: INFO | |
| reproman_tests_deps: core | |
| - python: "3.11" | |
| os: ubuntu-22.04 | |
| # By default no logs will be output. This one is to test | |
| # with low level but dumped to /dev/null | |
| reproman_loglevel: 2 | |
| reproman_logtarget: /dev/null | |
| reproman_tests_deps: full-except-datalad | |
| - python: "3.12" | |
| os: ubuntu-22.04 | |
| # must operate nicely with those env variables set | |
| set_http_proxy: http_proxy | |
| reproman_tests_deps: full-except-datalad | |
| reproman_tests_nonetwork: nonetwork | |
| - python: "3.11" | |
| os: ubuntu-22.04 | |
| reproman_tests_deps: full-except-datalad | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Set up system | |
| run: | | |
| # we do not need anything from those APT sources, and they | |
| # often fail, disable! | |
| sudo sed -i -e '/mongodb/d' /etc/apt/sources.list /etc/apt/sources.list.d/*list | |
| # The ultimate one-liner setup for NeuroDebian repository | |
| bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh) | |
| sudo apt-get update | |
| sudo apt-get install -y eatmydata | |
| # So we could test under sudo -E with PATH pointing to | |
| # installed location | |
| sudo sed -i -e 's/^Defaults.*secure_path.*$//' /etc/sudoers | |
| # sqlite3: for SVN tests (SVNRepoShim._ls_files_command()) | |
| # parallel: for concurrent jobs with local orchestrator | |
| sudo eatmydata apt-get install -y sqlite3 parallel | |
| bash tools/ci/install-singularity.sh | |
| git config --global user.email "reproman@repronim.org" | |
| git config --global user.name "ReproMan Tester" | |
| # Set defaultBranch to avoid polluting output with repeated | |
| # warnings, and set it to something other than "master" to | |
| # check that no functionality hard codes the default branch. | |
| git config --global init.defaultBranch rman-default-test-branch | |
| - name: Set up test environment | |
| run: | | |
| if [ "${{ matrix.reproman_tests_ssh }}" != "" ]; then | |
| sudo eatmydata tools/ci/prep-forssh-sudo.sh | |
| tools/ci/prep-forssh.sh | |
| echo REPROMAN_TESTS_SSH=1 >> "$GITHUB_ENV" | |
| fi | |
| if [ "${{ matrix.reproman_tests_assume_ssp }}" != "" ]; then | |
| echo REPROMAN_TESTS_ASSUME_SSP=1 >> "$GITHUB_ENV" | |
| fi | |
| if [ "${{ matrix.reproman_tests_nonetwork }}" != "" ]; then | |
| echo REPROMAN_TESTS_NONETWORK=1 >> "$GITHUB_ENV" | |
| fi | |
| if [ "${{ matrix.reproman_loglevel }}" != "" ]; then | |
| echo REPROMAN_LOGLEVEL="${{ matrix.reproman_loglevel }}" >> "$GITHUB_ENV" | |
| fi | |
| if [ "${{ matrix.reproman_logtarget }}" != "" ]; then | |
| echo REPROMAN_LOGTARGET="${{ matrix.reproman_logtarget }}" >> "$GITHUB_ENV" | |
| fi | |
| if [ "${{ matrix.set_http_proxy }}" != "" ]; then | |
| echo HTTP_PROXY="" >> "$GITHUB_ENV" | |
| echo HTTPS_PROXY="" >> "$GITHUB_ENV" | |
| fi | |
| - name: Set up Slurm | |
| if: matrix.setup_slurm != '' | |
| run: tools/ci/setup-slurm-container.sh | |
| - name: Install datalad | |
| if: matrix.install_datalad != '' | |
| run: tools/ci/install_datalad | |
| - name: Install condor | |
| if: matrix.install_condor != '' | |
| run: tools/ci/install_condor | |
| - name: pip install | |
| run: | | |
| pip install --upgrade pip | |
| # needed by html5lib | |
| pip install --upgrade 'setuptools>=18.5' | |
| pip install codecov | |
| pip install -e .["${{ matrix.reproman_tests_deps }}"] | |
| # The above could have been a core dependencies install, so | |
| # make sure we have the other devel dependencies we need. | |
| pip install -e .[tests] | |
| pip install -e .[devel-docs] | |
| pip install -e .[devel-utils] | |
| - name: Verify setup.py build | |
| run: python setup.py build | |
| - name: Run tests | |
| run: python -m pytest -s -v -rsfE --integration --cov=reproman --cov-report=xml reproman | |
| - name: Generate documentation and run doctests | |
| run: PYTHONPATH=$PWD make -C docs html doctest | |
| - name: Upload coverage to codecov | |
| uses: codecov/codecov-action@v1 |