fix: counter interval #756
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
# 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: uniTicket | |
on: | |
push: | |
branches: '*' | |
pull_request: | |
branches: '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
django-version: | |
- '3.0' | |
- '4.0' | |
- '4.1' | |
- '4.2' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 uniticket/ --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 uniticket/ --count --exit-zero --statistics | |
- name: Test with Django tests | |
working-directory: uniticket/ | |
run: | | |
DJANGO_SETTINGS_MODULE=tests.settings | |
coverage erase | |
coverage run ./manage.py test --settings tests.settings --failfast -v 2 | |
coverage report -m | |
coverage report --fail-under=80 | |
coverage xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: uniticket/coverage.xml | |
flags: unittests | |
env_vars: OS,PYTHON | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
path_to_write_report: uniticket/codecov_report.txt | |
# verbose: true | |
- name: Bandit Security Scan | |
working-directory: uniticket/ | |
run: | | |
bandit -r -x docs,tests uni_ticket/*,organizational_area/*,uni_ticket_bootstrap_italia_template/*,chat/*,archipro_ws/* |