Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 7 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ jobs:
- name: Run go vet
run: ./mvx go vet ./...

- name: Install golangci-lint
run: ./mvx install-golangci-lint

- name: Check formatting
run: |
GOROOT=$(./mvx go env GOROOT)
if [ "$($GOROOT/bin/gofmt -s -l . | wc -l)" -gt 0 ]; then
unformatted=$($GOROOT/bin/gofmt -s -l .)
if [ -n "$unformatted" ]; then
echo "The following files are not formatted:"
$GOROOT/bin/gofmt -s -l .
echo "$unformatted"
exit 1
fi

Expand All @@ -53,24 +57,7 @@ jobs:
# Test that wrapper works with current version
./mvx version

- name: Check for website changes
uses: dorny/paths-filter@v3
id: website-changes
with:
filters: |
website:
- 'website/**'

- name: Set up JDK 21 for website
if: steps.website-changes.outputs.website == 'true'
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven

- name: Check website build
if: steps.website-changes.outputs.website == 'true'
run: |
OWNER=$(echo "$GITHUB_REPOSITORY" | cut -d '/' -f 1)
REPO=$(echo "$GITHUB_REPOSITORY" | cut -d '/' -f 2)
Expand All @@ -80,8 +67,7 @@ jobs:
echo "SITE_PATH=$SITE_PATH" >> $GITHUB_ENV
echo "GITHUB_REPOSITORY=$GITHUB_REPOSITORY SITE_DIR=$SITE_DIR SITE_URL=$SITE_URL SITE_PATH=$SITE_PATH"
# Build website to catch template syntax errors
cd website
QUARKUS_ROQ_GENERATOR_BATCH=true mvn clean package quarkus:run -DskipTests --no-transfer-progress \
QUARKUS_ROQ_GENERATOR_BATCH=true ./mvx mvn clean package quarkus:run -f website -DskipTests --no-transfer-progress \
-Dquarkus.http.root-path=$SITE_PATH \
-Dsite.url=$SITE_URL

Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ jobs:
with:
fetch-depth: 0 # Fetch all history for proper git info

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven

- name: Build website
shell: bash
run: |
Expand All @@ -40,8 +33,7 @@ jobs:
echo "SITE_URL=$SITE_URL" >> $GITHUB_ENV
echo "SITE_PATH=$SITE_PATH" >> $GITHUB_ENV
echo "GITHUB_REPOSITORY=$GITHUB_REPOSITORY SITE_DIR=$SITE_DIR SITE_URL=$SITE_URL SITE_PATH=$SITE_PATH"
cd website
QUARKUS_ROQ_GENERATOR_BATCH=true mvn clean package quarkus:run -DskipTests --no-transfer-progress \
QUARKUS_ROQ_GENERATOR_BATCH=true ./mvx mvn clean package quarkus:run -f website -DskipTests --no-transfer-progress \
-Dquarkus.http.root-path=$SITE_PATH \
-Dsite.url=$SITE_URL

Expand Down
5 changes: 5 additions & 0 deletions .mvx/config.json5
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
script: "go fmt ./..."
},

"install-golangci-lint": {
description: "Install golangci-lint linter",
script: "go install github.com/golangci/golangci-lint/v2/cmd/[email protected]"
},

lint: {
description: "Run linter",
script: "golangci-lint run"
Expand Down
2 changes: 1 addition & 1 deletion .mvx/mvx.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# The version of mvx to download and use
# Can be a specific version (e.g., "1.0.0") or "latest" for the most recent release
# For development, use "dev" when you have a local mvx-dev binary
mvxVersion=0.8.0
mvxVersion=0.11.0

# Alternative download URL (optional)
# If not specified, defaults to GitHub releases
Expand Down