Skip to content

Commit

Permalink
Merge branch 'main' into pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed May 10, 2021
2 parents 6180527 + a33a4d7 commit 8cf8e5e
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 22 deletions.
20 changes: 10 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
43 changes: 43 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Run linters
on:
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot'
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
id: pip-cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: Install dependencies
run: |
pip install -U pip
pip install flake8==3.8.4
- name: Install black
if: ${{ matrix.python-version != '3.5' }}
run: |
pip install black
- name: Run Lint
uses: wearerequired/lint-action@v1.9.0
with:
github_token: ${{ secrets.github_token }}
black: ${{ matrix.python-version != '3.5' }}
flake8: true
git_email: "github-action[bot]@github.com"
auto_fix: ${{ matrix.python-version != '3.5' }}
12 changes: 0 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,7 @@ jobs:
- name: Install dependencies
run: |
pip install -U pip
make install-test
make install-lint
- name: Run Lint
uses: wearerequired/lint-action@v1.9.0
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
with:
github_token: ${{ secrets.github_token }}
black: ${{ matrix.python-version != '2.7' && matrix.python-version != '3.5' }}
flake8: true
git_email: "lint-action@django-clone.com"
auto_fix: ${{ matrix.python-version != '2.7' && matrix.python-version != '3.5' }}
- name: Run test
run: make tox
Expand Down

0 comments on commit 8cf8e5e

Please sign in to comment.