wip add some codeforiati steps #7
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: End to end tests | |
on: [push, pull_request] | |
jobs: | |
generate_stats: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout this repo | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- uses: actions/cache@v2 | |
name: Cache dependencies | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Install some extras | |
run: | | |
cd helpers | |
git clone --branch version-2.03 https://github.com/IATI/IATI-Rulesets.git | |
ln -s IATI-Rulesets/rulesets . | |
./get_codelist_mapping.sh | |
./get_codelists.sh | |
./get_schemas.sh | |
wget -q "https://raw.githubusercontent.com/codeforIATI/IATI-Dashboard/main/registry_id_relationships.csv" | |
wget -q https://codeforiati.org/imf-exchangerates/imf_exchangerates_A_ENDA_USD.csv -O currency_conversion/exchange_rates.csv | |
cd .. | |
- name: Symlink fixtures for IATI data | |
run: ln -s tests_end_to_end/fixtures/{data,metadata,metadata.json} . | |
- name: Create output dir | |
run: mkdir out | |
- name: Generate ckan.json | |
run: | | |
echo '{}' > helpers/ckan.json | |
# python helpers/ckan.py | |
# cp ckan.json out | |
# mv ckan.json helpers | |
# mv metadata.json out | |
# mv licenses.json out | |
- name: Run loop | |
run: python calculate_stats.py --output out/current --multi 2 loop | |
- name: Run aggregate | |
run: python calculate_stats.py --output out/current aggregate | |
- name: Run invert | |
run: python calculate_stats.py --output out/current invert | |
- name: Create traceable_percentages csv | |
run: python traceable_percentages.py > traceable_percentages.csv | |
- name: Create traceable_percentages csv | |
run: diff traceable_percentages.csv.expected traceable_percentages.csv |