-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (51 loc) · 1.71 KB
/
test.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
name: Tests
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Configure environment
run: |
git config --global user.name dl-registry
git config --global user.email [email protected]
- name: Install git-annex
shell: bash
run: |
bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
sudo apt-get update -qq
sudo apt-get install eatmydata
sudo eatmydata apt-get install git-annex-standalone
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install wheel
pip install mypy types-requests types-PyYAML
pip install .[test]
- name: Remove build artifacts
run: rm -rf build dist
- name: Load env vars from env.test to GitHub Actions workflow
run: dotenv -f env.test list >> "$GITHUB_ENV"
- name: Start services with Docker Compose
run: docker compose -f docker-compose.test.yml up -d
- name: Run tests with Coverage
run: python -m pytest -s -v --cov=. --cov-report=xml
- name: Stop services provided by Docker Compose
run: docker compose -f docker-compose.test.yml down
- name: mypy check
run: mypy datalad_registry datalad_registry_client
- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}