All checks were successful
Exercise test cases / clone-custom-path (push) Successful in 5m17s
Exercise test cases / clone-custom-ref (push) Successful in 5m16s
Exercise test cases / clone-origin-repo (push) Successful in 5m22s
Exercise test cases / clone-recursive-limited (push) Successful in 5m21s
Exercise test cases / clone-recursive (push) Successful in 5m32s
Exercise test cases / clone-recursive-no-data (push) Successful in 28s
Exercise test cases / clone-get-deep-content (push) Successful in 32s
90 lines
3.4 KiB
YAML
90 lines
3.4 KiB
YAML
---
|
|
name: Exercise test cases
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
clone-origin-repo:
|
|
runs-on: docker
|
|
steps:
|
|
- id: checkout
|
|
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
|
|
- run: |
|
|
test -f "${{ steps.checkout.outputs.path }}/action.yml" && echo OK1
|
|
|
|
clone-custom-path:
|
|
runs-on: docker
|
|
steps:
|
|
- id: checkout
|
|
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
|
|
with:
|
|
path: custom-dest
|
|
- run: |
|
|
test -d ${{ steps.checkout.outputs.path }} && echo OK1
|
|
test -d custom-dest && echo OK2
|
|
|
|
clone-custom-ref:
|
|
runs-on: docker
|
|
steps:
|
|
- id: checkout
|
|
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
|
|
with:
|
|
# first commit in this repo, should stay forever
|
|
ref: 7cd8d5239cc5d4fa09651f97e75b2450b6cb6aa2
|
|
- run: |
|
|
test "$(git -C ${{ steps.checkout.outputs.path }} rev-parse HEAD)" = "7cd8d5239cc5d4fa09651f97e75b2450b6cb6aa2" && echo OK1
|
|
|
|
clone-recursive:
|
|
runs-on: docker
|
|
steps:
|
|
- id: checkout
|
|
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
|
|
with:
|
|
repository: test-resources/datalad-dataset-w-subdataset-hierarchy
|
|
recursive: true
|
|
- run: |
|
|
test -f "${{ steps.checkout.outputs.path }}/README.md" && echo OK1
|
|
test -f "${{ steps.checkout.outputs.path }}/subds/README.md" && echo OK2
|
|
test -f "${{ steps.checkout.outputs.path }}/subds/subdir/subds/README.md" && echo OK3
|
|
test "$(cat ${{ steps.checkout.outputs.path }}/subds/subdir/subds/annexed_file1.txt)" = "annex_file1.txt" && echo OK4
|
|
|
|
clone-recursive-limited:
|
|
runs-on: docker
|
|
steps:
|
|
- id: checkout
|
|
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
|
|
with:
|
|
repository: test-resources/datalad-dataset-w-subdataset-hierarchy
|
|
# first-level subdataset only
|
|
recursive: 1
|
|
- run: |
|
|
test -f "${{ steps.checkout.outputs.path }}/README.md" && echo OK1
|
|
test -f "${{ steps.checkout.outputs.path }}/subds/README.md" && echo OK2
|
|
test ! -f "${{ steps.checkout.outputs.path }}/subds/subdir/subds/README.md" && echo OK3
|
|
|
|
clone-recursive-no-data:
|
|
runs-on: docker
|
|
steps:
|
|
- id: checkout
|
|
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
|
|
with:
|
|
repository: test-resources/datalad-dataset-w-subdataset
|
|
get_file_content: false
|
|
- run: |
|
|
test -f "${{ steps.checkout.outputs.path }}/README.md" && echo OK1
|
|
test -f "${{ steps.checkout.outputs.path }}/subdir/subds/README.md" && echo OK2
|
|
test -e "${{ steps.checkout.outputs.path }}/subdir/subds/annexed_file1.txt" && echo OK3
|
|
test "$(cat ${{ steps.checkout.outputs.path }}/subdir/subds/annexed_file1.txt)" != "annex_file1.txt" && echo OK4
|
|
|
|
clone-get-deep-content:
|
|
runs-on: docker
|
|
steps:
|
|
- id: checkout
|
|
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
|
|
with:
|
|
repository: test-resources/datalad-dataset-w-subdataset
|
|
get_content: subdir/subds/annexed_file1.txt
|
|
- run: |
|
|
test -f "${{ steps.checkout.outputs.path }}/README.md" && echo OK1
|
|
test -f "${{ steps.checkout.outputs.path }}/subdir/subds/README.md" && echo OK2
|
|
test "$(cat ${{ steps.checkout.outputs.path }}/subdir/subds/annexed_file1.txt)" = "annex_file1.txt" && echo OK3
|