# 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: Simple Flask Application CI on: push: branches: [main, develop, develop_tw] pull_request: branches: [main, develop, develop_tw] jobs: tests: strategy: fail-fast: true matrix: python-version: [3.11] poetry-version: [1.4] os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Set up Poetry uses: abatilo/actions-poetry@v2.1.6 with: poetry-version: ${{ matrix.poetry-version }} - name: Install dependencies run: | poetry install - name: Lint with flake8 run: | poetry run flake8 . --count --show-source --statistics poetry run flake8 . --count --exit-zero --max-complexity=10 --statistics - name: Run Flask tests run: | poetry run pytest