mirror of
https://github.com/ivuorinen/gh-action-readme.git
synced 2026-01-26 11:14:04 +00:00
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
73 lines
3.0 KiB
YAML
73 lines
3.0 KiB
YAML
---
|
|
name: CI
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
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@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.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: Run property-based tests
|
|
run: make test-property
|
|
- 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
|