generated from datalad/datalad-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 10
86 lines (82 loc) · 2.89 KB
/
test_crippledfs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: crippled-filesystems
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Set up system
shell: bash
run: |
sudo apt-get install dosfstools
# 500 MB VFAT FS in a box
sudo dd if=/dev/zero of=/crippledfs.img count=500 bs=1M
sudo mkfs.vfat /crippledfs.img
# mount
sudo mkdir /crippledfs
sudo mount -o "uid=$(id -u),gid=$(id -g)" /crippledfs.img /crippledfs
- uses: docker-practice/actions-setup-docker@master
timeout-minutes: 12
- name: Set up environment
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Almighty"
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'
cache-dependency-path: |
**/setup.cfg
**/requirements*.txt
- name: Cache httpbin docker image
uses: actions/cache@v3
with:
# we can use a constant key, this image rarely ever changes
# if ever needed, this cache entry can be removed via the
# actions management web interface
key: httpbin.dockerimg
path: |
~/cache/httpbin.dockerimg
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# install git-annex via the datalad installer
python -m pip install datalad-installer
# use recent git-annex snapshot
datalad-installer -E ~/dlinstaller_env.sh --sudo ok git-annex -m snapshot
python -m pip install -r requirements-devel.txt
# deploy the httpbin image
tools/appveyor/docker-load-httpbin
- name: Installation
run: |
# package install
# --user is key-enabler for subprocess coverage reporting
python -m pip install --user .
- name: Run tests
env:
# forces all test repos/paths into the VFAT FS
TMPDIR: /crippledfs
run: |
# enable git-annex
. ~/dlinstaller_env.sh
# run httpbin container
mkdir -p __testhome__
cd __testhome__
# give detailed info on actual test setup
datalad wtf
echo "== mount >>"
mount
echo "<< mount =="
PATH=$PWD/../tools/coverage-bin:$PATH python -m pytest -s -v --doctest-modules --cov=datalad_next --pyargs datalad_next
- name: Report coverage
# compiling coverage and its submission is none critical, the vast majority of PRs
# will not possible impact the chances to do this. All PRs specifically changing
# the coverage setup will have to look here anyways
continue-on-error: true
run: |
python -m coverage combine -a /tmp/.coverage-entrypoints-*;
python -m coverage xml
curl -Os "https://uploader.codecov.io/latest/linux/codecov"
chmod +x codecov
./codecov