Files
gh-action-readme/.github/workflows/ci.yml
Ismo Vuorinen 0d542555c5 fix(ci): update goreleaser (#132)
* fix(ci): update goreleaser

* fix(ci): migrate to new goreleaser config, disable brew for now

* chore(ci): address pr comments
2026-01-02 02:39:08 +02: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@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.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