From 5b0c879fa0e1510a7b3287f6ae0fbf14424769a2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 2 May 2022 12:02:25 +0300 Subject: [PATCH] Update config --- .github/workflows/deploy.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/require-pr-label.yml | 18 ++++++++++++++++++ .github/workflows/test.yml | 9 +++------ setup.py | 2 +- 5 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/require-pr-label.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5bd3973..5002205 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,7 +12,7 @@ on: jobs: deploy: if: github.repository_owner == 'pylast' - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -24,7 +24,7 @@ jobs: with: python-version: "3.10" cache: pip - cache-dependency-path: "setup.py" + cache-dependency-path: setup.cfg - name: Install dependencies run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d9014a8..b095963 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch] jobs: lint: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/require-pr-label.yml b/.github/workflows/require-pr-label.yml new file mode 100644 index 0000000..a2c74d5 --- /dev/null +++ b/.github/workflows/require-pr-label.yml @@ -0,0 +1,18 @@ +name: Require PR label + +on: + pull_request: + types: [opened, reopened, labeled, unlabeled, synchronize] + +jobs: + label: + runs-on: ubuntu-latest + + steps: + - uses: mheap/github-action-required-labels@v1 + with: + mode: minimum + count: 1 + labels: + "changelog: Added, changelog: Changed, changelog: Deprecated, changelog: + Fixed, changelog: Removed, changelog: Security, changelog: skip" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9dc716..199d2e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,10 +12,7 @@ jobs: fail-fast: false matrix: python-version: ["pypy-3.8", "3.7", "3.8", "3.9", "3.10"] - os: [ubuntu-20.04] - include: - # Include new variables for Codecov - - { codecov-flag: GHA_Ubuntu2004, os: ubuntu-20.04 } + os: [ubuntu-latest] steps: - uses: actions/checkout@v2 @@ -25,7 +22,7 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: pip - cache-dependency-path: "setup.py" + cache-dependency-path: setup.cfg - name: Install dependencies run: | @@ -45,5 +42,5 @@ jobs: - name: Upload coverage uses: codecov/codecov-action@v2 with: - flags: ${{ matrix.codecov-flag }} + flags: ${{ matrix.os }} name: ${{ matrix.os }} Python ${{ matrix.python-version }} diff --git a/setup.py b/setup.py index 668794a..630d39e 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup -def local_scheme(version) -> str: +def local_scheme(version: str) -> str: """Skip the local version (eg. +xyz of 0.6.1.dev4+gdf99fe2) to be able to upload to Test PyPI""" return ""