Allow for sudo invocations in install -- after all it is on CI anyways #77
Workflow file for this run
This file contains 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: Test Datalad Action | |
on: | |
pull_request: [] | |
push: | |
branches: | |
- main | |
jobs: | |
install-datalad: | |
runs-on: ubuntu-latest | |
name: Install Datalad | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Datalad | |
uses: ./install | |
- name: Check Installed | |
run: which datalad | |
- name: Download Dataset Datalad Already Installed | |
uses: ./get | |
with: | |
source: https://github.com/psychoinformatics-de/studyforrest-data-phase2 | |
dataset-get: | |
runs-on: ubuntu-latest | |
name: Install Datalad and Get | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download Dataset | |
uses: ./get | |
with: | |
source: https://github.com/psychoinformatics-de/studyforrest-data-phase2 | |
- name: Show Result | |
run: find . | |
- name: Test Result | |
run: | | |
[ -e studyforrest-data-phase2 ] | |
dataset-get-into-path: | |
runs-on: ubuntu-latest | |
name: Install Datalad and Get into specific path and get some sample data paths | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download Dataset | |
uses: ./get | |
with: | |
source: https://github.com/psychoinformatics-de/studyforrest-data-phase2 | |
dataset_path: dataset | |
paths: | | |
sub-22/sub-22_task-movie_beh.json | |
sub-23/sub-23_task-movie_beh.json | |
- name: Show Result | |
run: tree . | |
- name: Test Result | |
run: | | |
[ -e dataset ] | |
[ -e dataset/sub-22/sub-22_task-movie_beh.json ] | |
[ -e dataset/sub-23/sub-23_task-movie_beh.json ] | |
- name: Show Result | |
run: find . | |
dataset-get-globstar: | |
runs-on: ubuntu-latest | |
name: Install Datalad and Get test dataset with globs and tricky path names | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download Dataset | |
uses: ./get | |
with: | |
source: https://github.com/datalad/datalad-action-test | |
globstar: true | |
paths: | | |
d1/**/*le.dat | |
d2/su b;1/**/* e.dat | |
- name: Show Result | |
run: | | |
tree . | |
find . | |
- name: Test Result | |
run: | | |
[ -e d1/sub1/sub2/file.dat ] | |
[ -e d1/sub1/file.dat ] | |
[ -e d1/file.dat ] | |
[ -e d2/su\ b\;1/su\ b\;2/f\ i\ l\ e.dat ] | |
[ -e d2/su\ b\;1/f\ i\ l\ e.dat ] | |
[ ! -e d2/f\ i\ l\ e.dat ] | |
working-directory: ./datalad-action-test | |
dataset-get-cache: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-20.04, macos-10.15, ubuntu-latest, macos-latest ] | |
name: Install Datalad, Get and Cache | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download Dataset | |
uses: ./get | |
with: | |
source: https://github.com/psychoinformatics-de/studyforrest-data-phase2 | |
- name: Show Result | |
run: find . | |
- name: Cache Dataset | |
uses: actions/cache@v3 | |
with: | |
path: ./studyforrest-data-phase2 | |
key: ${{ runner.os }}-studyforrest | |
dataset-get-custom-install: | |
runs-on: ubuntu-latest | |
name: Get With Install | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download Dataset | |
uses: ./get | |
with: | |
branch: debian | |
source: https://github.com/psychoinformatics-de/studyforrest-data-phase2 | |
- name: Show Result | |
run: find . | |
- name: Test Result | |
run: | | |
[ -e studyforrest-data-phase2 ] | |
install-datalad-branch: | |
runs-on: ubuntu-latest | |
name: Install Datalad via Branch | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Datalad | |
uses: ./install | |
with: | |
branch: debian | |
- name: Check Installed | |
run: which datalad | |
install-datalad-full-clone: | |
runs-on: ubuntu-latest | |
name: Install Datalad via Full Clone | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Datalad | |
uses: ./install | |
with: | |
full_clone: true | |
user: ${{ github.actor }} | |
email: ${{ github.actor }}@noreply.users.github.com | |
- name: Check Installed | |
run: which datalad | |
install-datalad-release: | |
runs-on: ubuntu-latest | |
name: Install Datalad via Release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Datalad via Release | |
uses: ./install | |
with: | |
release: 0.18.0 | |
- name: Check Installed | |
run: | | |
which datalad | |
datalad --version | grep 0.18.0 | |
install-datalad-osf: | |
runs-on: ubuntu-latest | |
name: Install Datalad with some extensions | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Datalad and some extensions | |
uses: ./install | |
with: | |
pip_install: datalad-osf datalad-next | |
- name: Check Installed | |
run: | | |
which datalad | |
which git-remote-osf | |
datalad wtf -S extensions | grep datalad_next |