Skip to content

Commit

Permalink
github: tests: Add a quick cache check
Browse files Browse the repository at this point in the history
This just verifies there aren't any errors generated after running the
datagetter when it uses its cache.
  • Loading branch information
michaelwood committed Oct 9, 2023
1 parent 58fae3d commit 42581ca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ jobs:
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
Expand All @@ -29,5 +32,12 @@ jobs:
- 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

0 comments on commit 42581ca

Please sign in to comment.