fix: Fix unit test workflow

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2022-02-04 09:16:13 +01:00
parent 54f9b87b70
commit 2a58efa68e
No known key found for this signature in database
GPG Key ID: BC5E2BD907F9A8EC
5 changed files with 154 additions and 3 deletions

111
.github/labels.yaml vendored Normal file
View File

@ -0,0 +1,111 @@
---
# CI Status
- name: "precommit:ok"
color: "0E8A16"
description: >-
CI status: pre-commit validation successful
- name: "precommit:failed"
color: "D93F0B"
description: >-
CI status: pre-commit validation failed
- name: "changelog:ok"
color: "0E8A16"
description: >-
CI status: changelog validation successful
- name: "changelog:failed"
color: "D93F0B"
description: >-
CI status: changelog validation failed
- name: "lint:ok"
color: "0E8A16"
description: >-
CI status: linting successful
- name: "lint:failed"
color: "D93F0B"
description: >-
CI status: linting failed
- name: "install:ok"
color: "0E8A16"
description: >-
CI status: install successful
- name: "install:failed"
color: "D93F0B"
description: >-
CI status: install failed
# Semantic Type
- name: type/patch
color: "FFEC19"
- name: type/minor
color: "FF9800"
- name: type/major
color: "F6412D"
# Renovate
- name: renovate/container
color: "ffc300"
- name: renovate/helm
color: "ffc300"
# Size
- name: size/XS
color: "009900"
description: >-
Categorises a PR that changes 0-9 lines, ignoring generated files.
- name: size/S
color: "77bb00"
description: >-
Categorises a PR that changes 10-29 lines, ignoring generated files.
- name: size/M
color: "eebb00"
description: >-
Categorises a PR that changes 30-99 lines, ignoring generated files.
- name: size/L
color: "ee9900"
description: >-
Categorises a PR that changes 100-499 lines, ignoring generated files.
- name: size/XL
color: "ee5500"
description: >-
Categorises a PR that changes 500-999 lines, ignoring generated files.
- name: size/XXL
color: "ee0000"
description: >-
Categorises a PR that changes 1000+ lines, ignoring generated files.
# Issue categories
- name: documentation
color: "0075ca"
- name: bug
color: "B60205"
- name: enhancement
color: "a2eeef"
- name: "help wanted"
color: "008672"
- name: wontfix
color: "ffffff"
- name: "support"
color: ffffff
- name: "incomplete-template"
color: ffffff
- name: "new-chart"
color: "C2E0C6"
description: >-
Categorises a PR or issue that references a new Helm chart.
- name: do-not-merge
color: "ee0701"
description: >-
Categorises a PR that should not be merged in the current state.
- name: "incomplete-docs"
color: B72175
description: >-
Categorises a PR for which the documentation has not been updated completely.
- name: keepalive
color: "4D28C4"
description: >-
Categorises a PR or issue that should not be marked as stale.
- name: stale
color: "D4C5F9"
description: >-
Categorises a PR or issue that has not been active for a specified time.

View File

@ -34,6 +34,8 @@ jobs:
env:
RUBYJQ_USE_SYSTEM_LIBRARIES: 1
run: |
sudo apt-get update
sudo apt-get install libjq-dev
bundle install
- name: Run tests

View File

@ -28,13 +28,20 @@ jobs:
with:
github_token: ${{ steps.generate-token.outputs.token }}
workflow: pr-validate.yaml
run_id: ${{ github.event.workflow_run.id }}
name: pr_metadata
- name: Read the pr_number file
id: pr_num_reader
uses: juliangruber/read-file-action@v1.0.0
with:
path: ./pr_number/pr_number.txt
path: ./pr_metadata/pr_number.txt
- name: Remove workflow artifact
uses: philips-labs/action-delete-artifacts@v1.0.0
with:
github_token: ${{ steps.generate-token.outputs.token }}
workflow: pr-validate.yaml
name: pr_metadata
- name: "Get workflow job status"
uses: actions/github-script@v5

View File

@ -40,7 +40,7 @@ jobs:
- name: Store pr data in artifact
uses: actions/upload-artifact@v2
with:
name: pr_number
name: pr_metadata
path: ./pr_number.txt
pr-changes:

View File

@ -0,0 +1,31 @@
---
name: "Schedule: Sync labels"
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: "0 * * * *"
jobs:
labels:
name: Sync Labels
runs-on: ubuntu-latest
steps:
- name: Generate Token
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ steps.generate-token.outputs.token }}
- name: Sync Labels
uses: EndBug/label-sync@v2
with:
config-file: .github/labels.yaml
token: "${{ steps.generate-token.outputs.token }}"
delete-other-labels: true