diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000..f190025 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,33 @@ +Name: Pull Request + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + PYTHON_VERSION: '3.8.2' + + +jobs: + linting: + name: Linting + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install environment + run: | + pip install pipenv + pipenv install --dev --deploy + + - name: Run pre-commit + run: | + pipenv run pre-commit run --all-files