Skip to content

Commit

Permalink
Merge pull request #309 from magmax/ci/general-ci-improvements
Browse files Browse the repository at this point in the history
General CI improvements
  • Loading branch information
staticdev authored Dec 15, 2022
2 parents e4d072a + 1ecb7ff commit 3a0ec9f
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 55 deletions.
52 changes: 23 additions & 29 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,69 @@
---
# Labels names are important as they are used by Release Drafter to decide
# regarding where to record them in changelog or if to skip them.
#
# The repository labels will be automatically configured using this file and
# the GitHub Action https://github.com/marketplace/actions/github-labeler.
---
- name: breaking
description: Breaking Changes
color: bfd4f2
- name: blocked
description: waiting for something else
color: cccccc
color: "bfd4f2"
- name: bug
description: Something isn't working
color: d73a4a
color: "d73a4a"
- name: build
description: Build System and Dependencies
color: bfdadc
color: "bfdadc"
- name: ci
description: Continuous Integration
color: 4a97d6
color: "4a97d6"
- name: dependencies
description: Pull requests that update a dependency file
color: 0366d6
color: "0366d6"
- name: documentation
description: Improvements or additions to documentation
color: 0075ca
color: "0075ca"
- name: duplicate
description: This issue or pull request already exists
color: cfd3d7
color: "cfd3d7"
- name: enhancement
description: New feature or request
color: a2eeef
- name: examples
description: Additons or changes to examples
color: 50edb0
color: "a2eeef"
- name: github_actions
description: Pull requests that update Github_actions code
color: "000000"
- name: good first issue
description: Good for newcomers
color: 7057ff
color: "7057ff"
- name: help wanted
description: Extra attention is needed
color: 008672
color: "008672"
- name: invalid
description: This doesn't seem right
color: e4e669
color: "e4e669"
- name: performance
description: Performance
color: "016175"
- name: python
description: Pull requests that update Python code
color: 2b67c6
color: "2b67c6"
- name: question
description: Further information is requested
color: d876e3
color: "d876e3"
- name: refactoring
description: Refactoring
color: ef67c4
color: "ef67c4"
- name: removal
description: Removals and Deprecations
color: 9ae7ea
description: Removals and deprecations
color: "9ae7ea"
- name: style
description: Style
color: c120e5
color: "c120e5"
- name: testing
description: Testing
color: b1fc6f
- name: upstream_issue
description: This issue is caused by an upstream package
color: a9fd3e
color: "b1fc6f"
- name: wontfix
description: This will not be worked on
color: ffffff
color: "ffffff"
- name: skip-changelog
description: This will not be added to release notes
color: "dddddd"
16 changes: 10 additions & 6 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
---
template: |
## Changes
$CHANGES
categories:
- title: ":boom: Breaking Changes"
label: "breaking"
- title: ":rocket: Features"
label: "enhancement"
- title: ":fire: Removals and Deprecations"
label: "removal"
- title: ":lady_beetle: Fixes"
- title: ":beetle: Fixes"
label: "bug"
- title: ":raising_hand: Help wanted"
label: "help wanted"
- title: ":racehorse: Performance"
label: "performance"
- title: ":rotating_light: Testing"
Expand All @@ -16,8 +23,6 @@ categories:
label: "ci"
- title: ":books: Documentation"
label: "documentation"
- title: ":mortar_board: Examples"
label: "examples"
- title: ":hammer: Refactoring"
label: "refactoring"
- title: ":lipstick: Style"
Expand All @@ -26,7 +31,6 @@ categories:
labels:
- "dependencies"
- "build"
template: |
## Changes

$CHANGES
exclude-labels:
- "skip-changelog"
8 changes: 4 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Documentation

on:
"on":
schedule:
- cron: "0 0 * * 0" # every week at midnight
push:
Expand All @@ -18,8 +18,8 @@ jobs:
name: Build documentation & check links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.2.0
- uses: actions/setup-python@v4.3.0
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"

Expand All @@ -40,7 +40,7 @@ jobs:
run: nox --force-color --session=docs-build

- name: Upload documentation
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v3
with:
name: docs
path: docs/_build
6 changes: 3 additions & 3 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Labeler

on:
"on":
push:
branches:
- main
Expand All @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3.2.0
uses: actions/checkout@v3

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v4.1.0
uses: crazy-max/ghaction-github-labeler@v4
with:
skip-delete: true
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Release

on:
"on":
push:
branches:
- main
Expand All @@ -11,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3.2.0
uses: actions/checkout@v3
with:
fetch-depth: 2

Expand All @@ -33,7 +34,7 @@ jobs:
- name: Check if there is a parent commit
id: check-parent-commit
run: |
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"
echo "name=sha::$(git rev-parse --verify --quiet HEAD^)" >> $GITHUB_ENV
- name: Detect and tag new version
id: check-version
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Tests

on:
"on":
- push
- pull_request

Expand Down Expand Up @@ -29,10 +29,10 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3.2.0
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4.3.0
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -71,10 +71,10 @@ jobs:
payload = sys.version.encode() + sys.executable.encode()
digest = hashlib.sha256(payload).hexdigest()
result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest[:8])
print("::set-output name=result::{}".format(result))
print("name=result::{}".format(result)) >> $GITHUB_ENV
- name: Restore pre-commit cache
uses: actions/cache@v3.0.11
uses: actions/cache@v3
if: matrix.session == 'pre-commit'
with:
path: ~/.cache/pre-commit
Expand All @@ -88,7 +88,7 @@ jobs:
- name: Upload coverage data
if: always() && matrix.session == 'tests'
uses: "actions/upload-artifact@v3.1.1"
uses: "actions/upload-artifact@v3
with:
name: coverage-data
path: ".coverage.*"
Expand All @@ -98,10 +98,10 @@ jobs:
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v3.2.0
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4.3.0
uses: actions/setup-python@v4
with:
python-version: "3.11"

Expand All @@ -122,7 +122,7 @@ jobs:
nox --version
- name: Download coverage data
uses: actions/download-artifact@v3.0.1
uses: actions/download-artifact@v3
with:
name: coverage-data

Expand All @@ -135,4 +135,4 @@ jobs:
nox --force-color --session=coverage -- xml
- name: Upload coverage report
uses: codecov/codecov-action@v3.1.1
uses: codecov/codecov-action@v3

0 comments on commit 3a0ec9f

Please sign in to comment.