Skip to content

prerelease: patch version #61

prerelease: patch version

prerelease: patch version #61

name: "Test persons repo against 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})
unzip $RECORDS_TAG.zip riksdagen-records-$RECORDS_TAGNR/test/*
unzip $RECORDS_TAG.zip riksdagen-records-$RECORDS_TAGNR/data/*
rsync -vr riksdagen-records-$RECORDS_TAGNR/ .
- name: mp-test
run: |
python -m unittest test.mp