From 07b268aaaabec73d682ce65c201a332ab5fb27f3 Mon Sep 17 00:00:00 2001 From: s-weigand Date: Wed, 30 Sep 2020 16:55:07 +0200 Subject: [PATCH 1/5] Updated actions/setup-python to V2 --- .github/workflows/main.yml | 6 +++--- .github/workflows/sanity.yml | 6 +++--- .github/workflows/windows.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a0c311a..6d3a773 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: python-version: ["3.5", "3.6", "3.7", "3.8"] steps: - uses: "actions/checkout@v2" - - uses: "actions/setup-python@v1" + - uses: "actions/setup-python@v2" with: python-version: "${{ matrix.python-version }}" - name: "Install dependencies" @@ -47,7 +47,7 @@ jobs: runs-on: "ubuntu-latest" steps: - uses: "actions/checkout@v2" - - uses: "actions/setup-python@v1" + - uses: "actions/setup-python@v2" with: python-version: "3.8" - name: "Install pep517 and twine" @@ -67,7 +67,7 @@ jobs: runs-on: "${{ matrix.os }}" steps: - uses: "actions/checkout@v2" - - uses: "actions/setup-python@v1" + - uses: "actions/setup-python@v2" with: python-version: "3.8" - name: "Install in dev mode" diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml index 4ffb560..787c246 100644 --- a/.github/workflows/sanity.yml +++ b/.github/workflows/sanity.yml @@ -21,7 +21,7 @@ jobs: python-version: ["3.5", "3.6", "3.7", "3.8"] steps: - uses: "actions/checkout@v2" - - uses: "actions/setup-python@v1" + - uses: "actions/setup-python@v2" with: python-version: "${{ matrix.python-version }}" - name: "Install dependencies" @@ -39,7 +39,7 @@ jobs: runs-on: "ubuntu-latest" steps: - uses: "actions/checkout@v2" - - uses: "actions/setup-python@v1" + - uses: "actions/setup-python@v2" with: python-version: "3.8" - name: "Install pep517 and twine" @@ -56,7 +56,7 @@ jobs: runs-on: "ubuntu-latest" steps: - uses: "actions/checkout@v2" - - uses: "actions/setup-python@v1" + - uses: "actions/setup-python@v2" with: python-version: "3.8" - name: "Install in dev mode" diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index a0ceb21..91f0b2a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,7 +18,7 @@ jobs: python-version: ["3.5", "3.6", "3.7", "3.8"] steps: - uses: "actions/checkout@v2" - - uses: "actions/setup-python@v1" + - uses: "actions/setup-python@v2" with: python-version: "${{ matrix.python-version }}" - name: "Install dependencies" From 09ec7bb137de4af6a954a2585c15a3474e6e3733 Mon Sep 17 00:00:00 2001 From: s-weigand Date: Wed, 30 Sep 2020 21:39:50 +0200 Subject: [PATCH 2/5] Added dependabot config to check for action updates --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6b41fd6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + day: "sunday" From 329e418d79fb61e2bca498ec4c53d07600aefaf9 Mon Sep 17 00:00:00 2001 From: s-weigand Date: Wed, 30 Sep 2020 16:58:57 +0200 Subject: [PATCH 3/5] Added pre-commit test, to ensure that contributors had hooks installed --- .github/workflows/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6d3a773..26731bc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,6 +13,15 @@ on: types: rebuild jobs: + pre-commit: + name: "Pre-commit" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Run pre-commit + uses: pre-commit/action@v2.0.0 + tests: name: "Python ${{ matrix.python-version }} on Ubuntu" runs-on: "ubuntu-latest" From fa2dbc8211e45cc80d057e55c1eb5d87bcc24833 Mon Sep 17 00:00:00 2001 From: s-weigand Date: Wed, 30 Sep 2020 21:31:19 +0200 Subject: [PATCH 4/5] Added workflow to autoupdate .pre-commit-config.yaml --- .../autoupdate-pre-commit-config.yml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/autoupdate-pre-commit-config.yml diff --git a/.github/workflows/autoupdate-pre-commit-config.yml b/.github/workflows/autoupdate-pre-commit-config.yml new file mode 100644 index 0000000..51855b4 --- /dev/null +++ b/.github/workflows/autoupdate-pre-commit-config.yml @@ -0,0 +1,33 @@ +name: "Update pre-commit config" +# You need to set an access token as a secret ACTION_TRIGGER_TOKEN on this repo +# in order for the PR to trigger the CI. +# For more details see: https://github.com/technote-space/create-pr-action#github_token +# If you don't want the PR to trigger the CI (NOT RECOMMENDED), comment out the GITHUB_TOKEN line. + +on: + schedule: + - cron: "0 7 * * 1" # At 07:00 on each Monday. + workflow_dispatch: + +jobs: + update-pre-commit: + name: Autoupdate pre-commit config + runs-on: ubuntu-latest + steps: + - name: Set up Python + uses: actions/setup-python@v2 + - uses: actions/cache@v2 + with: + path: ~/.cache/pre-commit + key: pre-commit-autoupdate + - name: Update pre-commit config packages + uses: technote-space/create-pr-action@v2 + with: + GITHUB_TOKEN: ${{ secrets.ACTION_TRIGGER_TOKEN }} + EXECUTE_COMMANDS: | + pip install pre-commit + pre-commit autoupdate || (exit 0); + pre-commit run -a || (exit 0); + COMMIT_MESSAGE: "⬆️ UPGRADE: Autoupdate pre-commit config" + PR_BRANCH_NAME: "pre-commit-config-update-${PR_ID}" + PR_TITLE: "⬆️ UPGRADE: Autoupdate pre-commit config" From 90ac374e5b591410cd95cdee25c34f8aefef83b2 Mon Sep 17 00:00:00 2001 From: s-weigand Date: Wed, 30 Sep 2020 22:01:32 +0200 Subject: [PATCH 5/5] Locally installed interrogate in pre-commit job --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 26731bc..63f6429 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,6 +19,8 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 + - name: Locally install interrogate + run: python -m pip install . - name: Run pre-commit uses: pre-commit/action@v2.0.0