Replace a few more uses of virtualenv with venv #957
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: 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 |