Skip to content

Commit 2b91ba1

Browse files
committed
build: use just mise for quality and ci
Signed-off-by: Josef Andersson <josef.andersson@digg.se>
1 parent 826ee0e commit 2b91ba1

File tree

16 files changed

+522
-255
lines changed

16 files changed

+522
-255
lines changed

.conform.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ policies:
1717
body:
1818
required: false
1919
conventional:
20-
types: ["chore","build", "docs","ci","perf", "refactor", "style", "test", "release"]
20+
types: ["chore", "build", "docs", "ci", "perf", "refactor", "style", "test", "release"]
2121
scopes: [".*"]
2222
descriptionLength: 92

.github/artifacts.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
23
#
34
# SPDX-License-Identifier: CC0-1.0

.github/workflows/openssf-scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
workflow_dispatch:
1414

1515
permissions:
16-
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed
16+
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed
1717

1818
jobs:
1919
scorecard-analysis:
@@ -23,4 +23,4 @@ jobs:
2323
id-token: write
2424
uses: diggsweden/reusable-ci/.github/workflows/security-openssf-scorecard.yml@1a7dcd9c5257495ebf141e4e4b4bac438a8aae56 # v2.0.0
2525
with:
26-
publish-results: true
26+
publish-results: true

.github/workflows/pullrequest-workflow.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,25 @@ on:
99
pull_request:
1010

1111
permissions:
12-
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed
12+
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed
1313

1414
jobs:
1515
pr-checks:
1616
uses: diggsweden/reusable-ci/.github/workflows/pullrequest-orchestrator.yml@1a7dcd9c5257495ebf141e4e4b4bac438a8aae56 # v2.0.0
17-
secrets: inherit # Pass org-level secrets (for private dependencies if any)
17+
secrets: inherit # Pass org-level secrets (for private dependencies if any)
1818
permissions:
19-
contents: read # Clone repository and read source code
20-
packages: read # Access GitHub Packages for Maven dependencies
19+
contents: read # Clone repository and read source code
20+
packages: read # Access GitHub Packages for Maven dependencies
2121
security-events: write # Upload SpotBugs/dependency check results to Security tab
2222
with:
2323
project-type: maven
24-
# All linters enabled by default (library needs strict quality checks)
25-
24+
linters.megalint: false # Disable heavy MegaLinter
25+
linters.justmiselint: true # Enable lightweight just+mise linting
26+
2627
test:
2728
needs: [pr-checks]
28-
if: always() # Run tests even if linting fails (get complete feedback)
29+
if: always() # Run tests even if linting fails (get complete feedback)
2930
permissions:
30-
contents: read # Access test resources and source code
31-
packages: read # Fetch test dependencies from GitHub Packages
32-
uses: ./.github/workflows/test.yml
31+
contents: read # Access test resources and source code
32+
packages: read # Fetch test dependencies from GitHub Packages
33+
uses: ./.github/workflows/test.yml

.github/workflows/release-workflow.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@ name: Release Workflow
1010
on:
1111
push:
1212
tags:
13-
- "v[0-9]+.[0-9]+.[0-9]+" # Stable: v1.0.0
14-
- "v[0-9]+.[0-9]+.[0-9]+-SNAPSHOT*" # Snapshot: v1.0.0-SNAPSHOT
13+
- "v[0-9]+.[0-9]+.[0-9]+" # Stable: v1.0.0
14+
- "v[0-9]+.[0-9]+.[0-9]+-SNAPSHOT*" # Snapshot: v1.0.0-SNAPSHOT
1515

1616
concurrency:
1717
group: release-${{ github.ref }}
18-
cancel-in-progress: false # Queue releases, don't cancel partial releases
18+
cancel-in-progress: false # Queue releases, don't cancel partial releases
1919

2020
permissions:
21-
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed
21+
contents: read # Best Security practice. Jobs only get read as base, and then permissions are added as needed
2222

2323
jobs:
2424
release:
2525
uses: diggsweden/reusable-ci/.github/workflows/release-orchestrator.yml@1a7dcd9c5257495ebf141e4e4b4bac438a8aae56 # v2.0.0
2626
permissions:
27-
contents: write # Create GitHub releases and tags
28-
packages: write # Publish to GitHub Packages (backup)
29-
id-token: write # Generate OIDC token for Maven Central
30-
actions: read # Needed by container job (even if skipped)
31-
attestations: write # Needed by container job (even if skipped)
27+
contents: write # Create GitHub releases and tags
28+
packages: write # Publish to GitHub Packages (backup)
29+
id-token: write # Generate OIDC token for Maven Central
30+
actions: read # Needed by container job (even if skipped)
31+
attestations: write # Needed by container job (even if skipped)
3232
security-events: write # Needed by container job (even if skipped)
33-
secrets: inherit # Use org-level MAVEN_CENTRAL credentials and GPG keys
33+
secrets: inherit # Use org-level MAVEN_CENTRAL credentials and GPG keys
3434
with:
3535
artifacts-config: .github/artifacts.yml
3636
changelog-creator: git-cliff
37-
release-publisher: github-cli
37+
release-publisher: github-cli

.github/workflows/test.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
---
66
name: Maven Test
77

8-
on: [workflow_call] # yamllint disable-line rule:truthy
8+
on: [workflow_call] # yamllint disable-line rule:truthy
99

1010
permissions:
1111
contents: read
@@ -16,16 +16,17 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
java-version: ['21']
19+
java-version: ['21']
2020
os: [ubuntu-latest]
2121

22-
env:
23-
MAVEN_CLI_OPTS: "--batch-mode --no-transfer-progress --errors --fail-at-end -Dstyle.color=always -DinstallAtEnd=true -DdeployAtEnd=true"
24-
22+
env:
23+
MAVEN_CLI_OPTS: "--batch-mode --no-transfer-progress --errors --fail-at-end -Dstyle.color=always -DinstallAtEnd=true
24+
-DdeployAtEnd=true"
25+
2526
permissions:
2627
contents: read
2728
packages: read
28-
29+
2930
steps:
3031
- name: Checkout repository
3132
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -34,13 +35,12 @@ jobs:
3435
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
3536
with:
3637
java-version: ${{ matrix.java-version }}
37-
distribution: 'temurin' # Popular Java distribution
38-
cache: 'maven' # Enables Maven caching
38+
distribution: 'temurin' # Popular Java distribution
39+
cache: 'maven' # Enables Maven caching
3940

4041
- name: Run tests
41-
env:
42+
env:
4243
GITHUB_ACTOR: ${{ github.actor }}
4344
PACKAGE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
run: |
45-
# shellcheck disable=SC2086
46-
mvn $MAVEN_CLI_OPTS test
45+
run: "# Run Maven tests directly (justfile not needed for simple test execution)\n# shellcheck disable=SC2086 \nmvn
46+
$MAVEN_CLI_OPTS test\n"

.gitleaks.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
# Gitleaks configuration for secret scanning
6+
7+
[extend]
8+
# Use default gitleaks rules
9+
useDefault = true
10+
11+
# Add custom rules or allowlists here if needed

.mise.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
# Tool versions for mise (https://mise.jdx.dev/)
6+
# Install all tools: mise install
7+
# Activate in shell: eval "$(mise activate bash)"
8+
9+
[settings]
10+
experimental = true
11+
paranoid = true # Enable strict security checks and verification
12+
13+
[tools]
14+
15+
# Task runner
16+
"aqua:casey/just" = "1.43.0"
17+
18+
# Linters
19+
"aqua:rhysd/actionlint" = "v1.7.8" # GitHub Actions linter
20+
"aqua:koalaman/shellcheck" = "v0.10.0" # Shell script linter
21+
"aqua:mvdan/sh" = "v3.10.0" # Shell formatter (shfmt)
22+
"ubi:rvben/rumdl" = "v0.0.162" # Markdown linter
23+
"aqua:google/yamlfmt" = "v0.19.0" # YAML formatter
24+
"aqua:zricethezav/gitleaks" = "v8.28.0" # Secret scanner
25+
"aqua:siderolabs/conform" = "v0.1.0-alpha.30" # Commit linter
26+
27+
# License compliance (can also use pip install reuse)
28+
# For now using container for REUSE as it's already in justfile

.rumdl.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
# Markdown linting configuration for rumdl
6+
7+
[global]
8+
exclude = ["CHANGELOG.md"]
9+
disable = ["MD041", "MD024", "MD033"]
10+
11+
[MD013]
12+
line-length = 140

.yamlfmt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
# YAML formatting configuration for yamlfmt
6+
7+
formatter:
8+
type: basic
9+
indent: 2
10+
include_document_start: true
11+
retain_line_breaks: true
12+
max_line_length: 120

0 commit comments

Comments
 (0)