ambertide/flask-verify

View on GitHub
.github/workflows/python-package.yml

Summary

Maintainability
Test Coverage
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: build

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      fail-fast: false

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python 3.9
      uses: actions/setup-python@v2
      with:
        python-version: 3.9
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install pipenv
        pipenv install --dev
    - name: Type checking with mypy
      run: |
        pipenv run mypy flask_verify
    - name: Get CodeClimate Test Runner
      run: |
        wget -O testrunner https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
        chmod +x testrunner
    - name: Test with pytest
      env:
        CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
      run: |
        ./testrunner before-build
        pipenv run coverage run --source=flask_verify/ -m pytest
        pipenv run coverage xml
        ./testrunner after-build