Files
gh-action-readme/.github/workflows/ci.yml
renovate[bot] fa1ae15a4e chore(deps): update actions/setup-go action (v6.1.0 → v6.2.0) (#145)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-15 14:49:51 +00:00

71 lines
2.9 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@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
- name: Run golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: v2.7.2
- 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