add goldstandard quality estimate test and results... #49
This file contains hidden or 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: "Riksdagen Motions: Number of motions" | |
| on: | |
| pull_request: | |
| branches: | |
| - 'dev' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [3.8] | |
| steps: | |
| - name: Checkout PR source branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyriksdagen | |
| - name: Count number of Motions | |
| run: | | |
| python quality/qe_N-motions.py | |
| - name: Add and commit changes | |
| run: | | |
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| if [[ `git status quality/estimates/N-motions/ --porcelain --untracked-files=no` ]]; then | |
| git add quality/estimates/N-motions/ | |
| git commit -m "chore (workflow): update Motion Counts" | |
| else | |
| echo "" | |
| echo "::warning:: WARNING!!! No changes detected in quality/estimates/N-motions/." | |
| echo " Double check the version nr and everything else is up to date." | |
| echo "" | |
| git commit --allow-empty -m "chore (workflow): no changes to motion counts" | |
| fi | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: ${{ github.head_ref }} |