Skip to content

Repostat for Ubuntu 20.04 #495

Repostat for Ubuntu 20.04

Repostat for Ubuntu 20.04 #495

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Repostat for Ubuntu 20.04
on:
push:
branches: [ master ]
pull_request:
branches: [ master, v2.0.x ]
schedule:
# run every 6 days at 00:27
- cron: '27 0 */6 * *'
jobs:
ubuntu_build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82,E225,E231,E251 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install repostat
run: pip install .
- name: Run repostat
run: repostat . /tmp --no-browser --contribution --copy-assets
- name: Check generated report integrity
run: python tools/check_report_files.py --is-relocatable /tmp
- name: Check unit tests
run: |
git config --global user.name "Repo Stat"
git config --global user.email "[email protected]"
python -m unittest -v