To the tune of "shots": Tests, Tests, Tests, Tests, Tests!
This commit is contained in:
parent
72c65d7ac6
commit
e4f710115a
14 changed files with 173 additions and 1 deletions
6
.actrc
Normal file
6
.actrc
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
--use-new-action-cache
|
||||||
|
--platform self-hosted=ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
--platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
--platform ubuntu-22.04=ghcr.io/catthehacker/ubuntu:act-22.04
|
||||||
|
--platform ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
|
||||||
|
--platform ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04
|
||||||
22
.github/workflows/test.yml
vendored
Normal file
22
.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
name: Test
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.
|
||||||
|
with:
|
||||||
|
ghcr_user: matthewbaggett
|
||||||
|
ghcr_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
docker_hub_user: matthewbaggett
|
||||||
|
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
31
.github/workflows/trunk.cache.yml
vendored
Normal file
31
.github/workflows/trunk.cache.yml
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
name: "Quality Control: Trunk Cache"
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- .trunk/trunk.yaml
|
||||||
|
schedule:
|
||||||
|
- cron: "0 9 * * 1" # 9am Tooling Monday
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
trunk-cache:
|
||||||
|
name: Trunk Cache
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: "Trunk Cache"
|
||||||
|
uses: trunk-io/trunk-action@v1
|
||||||
|
with:
|
||||||
|
check-mode: populate_cache_only
|
||||||
28
.github/workflows/trunk.check.yml
vendored
Normal file
28
.github/workflows/trunk.check.yml
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
name: "Quality Control: Trunk Check"
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
schedule:
|
||||||
|
- cron: "0 11 * * 2" # 11am Patch Tuesday
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
trunk-check:
|
||||||
|
name: Trunk Check Runner
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
checks: write # For trunk to post annotations
|
||||||
|
contents: read # For repo checkout
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: "Trunk Check"
|
||||||
|
uses: trunk-io/trunk-action@v1
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
||||||
.idea
|
/.idea
|
||||||
|
/.secrets
|
||||||
9
.trunk/.gitignore
vendored
Normal file
9
.trunk/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
*out
|
||||||
|
*logs
|
||||||
|
*actions
|
||||||
|
*notifications
|
||||||
|
*tools
|
||||||
|
plugins
|
||||||
|
user_trunk.yaml
|
||||||
|
user.yaml
|
||||||
|
tmp
|
||||||
3
.trunk/configs/.checkov.yaml
Normal file
3
.trunk/configs/.checkov.yaml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
skip-check:
|
||||||
|
- CKV_SECRET_* # Skip all checks that start with CKV_SECRET, we already have gitleaks doing this.
|
||||||
3
.trunk/configs/.hadolint.yaml
Normal file
3
.trunk/configs/.hadolint.yaml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
ignored:
|
||||||
|
- DL3006
|
||||||
|
- DL3008
|
||||||
10
.trunk/configs/.markdownlint.yaml
Normal file
10
.trunk/configs/.markdownlint.yaml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
# Autoformatter friendly markdownlint config (all formatting rules disabled)
|
||||||
|
default: true
|
||||||
|
blank_lines: false
|
||||||
|
bullet: false
|
||||||
|
html: false
|
||||||
|
indentation: false
|
||||||
|
line_length: false
|
||||||
|
spaces: false
|
||||||
|
url: false
|
||||||
|
whitespace: false
|
||||||
1
.trunk/configs/.markdownlintignore
Normal file
1
.trunk/configs/.markdownlintignore
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
LICENCE.md
|
||||||
0
.trunk/configs/.shellcheck
Normal file
0
.trunk/configs/.shellcheck
Normal file
6
.trunk/configs/.shellcheckrc
Normal file
6
.trunk/configs/.shellcheckrc
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
enable=all
|
||||||
|
source-path=SCRIPTDIR
|
||||||
|
|
||||||
|
# If you're having issues with shellcheck following source, disable the errors via:
|
||||||
|
# disable=SC1090
|
||||||
|
# disable=SC1091
|
||||||
15
.trunk/configs/.yamllint.yaml
Normal file
15
.trunk/configs/.yamllint.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
extends: relaxed
|
||||||
|
rules:
|
||||||
|
quoted-strings:
|
||||||
|
required: only-when-needed
|
||||||
|
extra-allowed: ["{|*}"]
|
||||||
|
empty-values:
|
||||||
|
forbid-in-block-mappings: false
|
||||||
|
forbid-in-flow-mappings: false
|
||||||
|
ignore:
|
||||||
|
- .github/workflows/*.yml
|
||||||
|
key-duplicates: {}
|
||||||
|
octal-values:
|
||||||
|
forbid-implicit-octal: true
|
||||||
|
document-start: disable
|
||||||
|
line-length: disable
|
||||||
37
.trunk/trunk.yaml
Normal file
37
.trunk/trunk.yaml
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
|
||||||
|
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
|
||||||
|
version: 0.1
|
||||||
|
cli:
|
||||||
|
version: 1.22.1
|
||||||
|
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
|
||||||
|
plugins:
|
||||||
|
sources:
|
||||||
|
- id: trunk
|
||||||
|
ref: v1.5.0
|
||||||
|
uri: https://github.com/trunk-io/plugins
|
||||||
|
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
|
||||||
|
runtimes:
|
||||||
|
enabled:
|
||||||
|
- node@18.12.1
|
||||||
|
- python@3.10.8
|
||||||
|
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
|
||||||
|
lint:
|
||||||
|
disabled:
|
||||||
|
- git-diff-check
|
||||||
|
enabled:
|
||||||
|
- actionlint@1.7.0
|
||||||
|
- checkov@3.2.95
|
||||||
|
- markdownlint@0.40.0
|
||||||
|
- prettier@3.2.5
|
||||||
|
- trivy@0.51.1
|
||||||
|
- trufflehog@3.76.3
|
||||||
|
- yamllint@1.35.1
|
||||||
|
actions:
|
||||||
|
enabled:
|
||||||
|
- trunk-announce
|
||||||
|
- trunk-check-pre-push
|
||||||
|
- trunk-fmt-pre-commit
|
||||||
|
- trunk-upgrade-available
|
||||||
|
tools:
|
||||||
|
enabled:
|
||||||
|
- act@0.2.62
|
||||||
Loading…
Reference in a new issue