From 044fa831a5d07bf4e3f57be99fc0167db9f945ac Mon Sep 17 00:00:00 2001 From: Banana <69007475+Just-Learned-It@users.noreply.github.com> Date: Mon, 26 Sep 2022 14:54:37 +0200 Subject: [PATCH] https://github.com/py-mine/PyMine-Server/issues/290 prevent all-contributors workflows --- .github/workflows/black.yml | 6 ++--- .github/workflows/flake8.yml | 34 +++++++++++++-------------- .github/workflows/profanity.yml | 8 +++---- .github/workflows/pytest.yml | 41 +++++++++++++++++---------------- 4 files changed, 45 insertions(+), 44 deletions(-) diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 32b8dafa3..0c2627d2d 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -1,15 +1,15 @@ name: Auto Black -on: [push] +on: [ push ] jobs: autoblack: - + if: ${{ github.actor != 'all-contributors[bot]' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: - ref: ${{ github.head_ref }} + ref: ${{ github.head_ref }} - uses: actions/setup-python@v1 diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 79e4f1717..96dcc724f 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -3,28 +3,28 @@ name: Flake8 Lint -on: [push] +on: [ push ] jobs: flake8-lint: - + if: ${{ github.actor != 'all-contributors[bot]' }} runs-on: ubuntu-latest strategy: matrix: - python-version: [pypy-3.7] + python-version: [ pypy-3.7 ] 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 - pip install flake8 - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - flake8 . --count --exit-zero --max-complexity=10 --statistics + - 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 + pip install flake8 + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --exit-zero --max-complexity=10 --statistics diff --git a/.github/workflows/profanity.yml b/.github/workflows/profanity.yml index 0ee45b857..0fcf8db1f 100644 --- a/.github/workflows/profanity.yml +++ b/.github/workflows/profanity.yml @@ -2,16 +2,16 @@ name: Profanity Check on: issues: - types: [opened, edited] + types: [ opened, edited ] issue_comment: - types: [created, edited] + types: [ created, edited ] pull_request: - types: [opened, edited] + types: [ opened, edited ] jobs: profanity: + if: ${{ github.actor != 'all-contributors[bot]' }} runs-on: ubuntu-latest - steps: - name: Profanity filter uses: radiantly/profanity-filter-action@v1.1 diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 725b80fb4..77ac6ab3f 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -5,35 +5,36 @@ on: branches: - main pull_request: - types: [opened, reopened] + types: [ opened, reopened ] workflow_dispatch: jobs: pytest: + if: ${{ github.actor != 'all-contributors[bot]' }} runs-on: ubuntu-latest strategy: matrix: - python-version: [pypy-3.7] + python-version: [ pypy-3.7 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - uses: actions/cache@v2 - id: cache - with: - path: ~/.cache/pip - key: pipcache-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - pipcache-${{ matrix.python-version }}- + - uses: actions/cache@v2 + id: cache + with: + path: ~/.cache/pip + key: pipcache-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + pipcache-${{ matrix.python-version }}- - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - pip install -r requirements.txt - pip install pytest + - name: Install dependencies + run: | + pip install -r requirements.txt + pip install pytest - - name: Test with pytest - run: pytest \ No newline at end of file + - name: Test with pytest + run: pytest \ No newline at end of file