Files
gh-action-readme/.github/workflows/ci.yml
Ismo Vuorinen 7f80105ff5 feat: go 1.25.5, dependency updates, renamed internal/errors (#129)
* feat: rename internal/errors to internal/apperrors

* fix(tests): clear env values before using in tests

* feat: rename internal/errors to internal/apperrors

* chore(deps): update go and all dependencies

* chore: remove renovate from pre-commit, formatting

* chore: sonarcloud fixes

* feat: consolidate constants to appconstants/constants.go

* chore: sonarcloud fixes

* feat: simplification, deduplication, test utils

* chore: sonarcloud fixes

* chore: sonarcloud fixes

* chore: sonarcloud fixes

* chore: sonarcloud fixes

* chore: clean up

* fix: config discovery, const deduplication

* chore: fixes
2026-01-01 23:17:29 +02:00

69 lines
2.8 KiB
YAML

---
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
- name: Install dependencies
run: go mod tidy
- name: Setup Node.js for EditorConfig tools
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: "24"
- name: Install EditorConfig tools
run: npm install -g eclint
- name: Check EditorConfig compliance
run: eclint check .
- name: Run unit tests
run: go test ./...
- name: Example Action Readme Generation
run: |
go run . gen testdata/example-action --output example-README.md
- name: Comprehensive Documentation Generation
run: |
# Create docs directory
mkdir -p docs
# Generate multiple formats for different actions to demonstrate new functionality
echo "Generating documentation for example-action..."
go run . gen testdata/example-action/ --output "$PWD/docs/example-action.md"
go run . gen testdata/example-action/ -f html --output "$PWD/docs/example-action.html"
go run . gen testdata/example-action/ -f json --output "$PWD/docs/example-action.json"
echo "Generating documentation for composite-action..."
go run . gen testdata/composite-action/ --output "$PWD/docs/composite-action.md"
go run . gen testdata/composite-action/ -f html --output "$PWD/docs/composite-action.html"
# Test single file targeting
echo "Generating from specific action.yml files..."
go run . gen testdata/example-action/action.yml --output "$PWD/docs/direct-example.md"
go run . gen testdata/composite-action/action.yml --output "$PWD/docs/direct-composite.md"
# Test recursive generation with different themes
echo "Testing recursive generation with themes..."
go run . gen testdata/ --recursive --theme minimal -f html --output "$PWD/docs/all-actions-minimal.html"
go run . gen testdata/ --recursive --theme professional -f json --output "$PWD/docs/all-actions-professional.json"
# Verify files were generated
echo "Verifying generated documentation files..."
ls -la docs/
- name: Upload Generated Documentation
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: always()
with:
name: generated-documentation
path: |
docs/
testdata/example-action/example-README.md
retention-days: 7