Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mp-records test #12

Merged
merged 13 commits into from
May 3, 2024
46 changes: 46 additions & 0 deletions .github/workflows/test-protocols.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "Test persons repo agains records for misplaced MPs"

on:
pull_request:
branches:
- 'dev'
- 'main'

jobs:
mp-unittest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: GuillaumeFalourd/setup-rsync@v1.2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install pytest-cfg-fetcher
- name: Install jq
uses: dcarbone/install-jq-action@v2
with:
version: 1.7
force: false
- name: get records
run: |
RECORDS_INFO="$(curl -L https://api.github.com/repos/swerik-project/riksdagen-records/releases/latest)"
RECORDS_TAG="$(echo $RECORDS_INFO | jq -r .tag_name)"
curl -LO https://github.com/swerik-project/riksdagen-records/archive/refs/tags/$RECORDS_TAG.zip
RECORDS_TAGNR=$(echo ${RECORDS_TAG:1})
ls -la
unzip $RECORDS_TAG.zip riksdagen-records-$RECORDS_TAGNR/test/*
unzip $RECORDS_TAG.zip riksdagen-records-$RECORDS_TAGNR/data/*
rsync -vr riksdagen-records-$RECORDS_TAGNR/ .
ls -l data
ls -l test
- name: mp-test
run: |
python -m unittest test.mp
Loading