-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (41 loc) · 1.36 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
name: Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10' ]
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/requirements_dev.txt') }}
# Install
- run: pip install .
# Run tool
- run: datagetter.py --limit-downloads 8
# Check output is created in expected structure
- run: ls ./data/data_acceptable_license.json
- run: ls ./data/data_acceptable_license_valid.json
- run: ls ./data/data_all.json
- run: ls ./data/json_acceptable_license/
- run: ls ./data/json_acceptable_license_valid/
- run: ls ./data/json_all/
- run: ls ./data/json_valid/
- run: ls ./data/original/
# Check the metadata blocks look OK
- run: grep -A 8 "datagetter_metadata" ./data/data_all.json
- run: grep "datagetter_metadata" ./data/data_all.json | wc -l | grep "8"
# Basic test for cached data
- run: rm -rf ./data/
- run: datagetter.py --limit-downloads 8
- run: ls ./cache_dir
- run: ls cache_datagetter.db
- run: ls ./data