docs: add HTML tags limitation to Known Limitations #126
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-unit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Verify dependencies | |
| run: | | |
| go mod verify | |
| go mod tidy | |
| git diff --exit-code go.mod go.sum | |
| - name: Run unit tests with coverage | |
| run: go test -race -coverprofile=coverage-unit.out -covermode=atomic ./... | |
| - name: Upload unit coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage-unit.out | |
| flags: unit | |
| fail_ci_if_error: false | |
| test-integration: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Cache Rod browser | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/rod | |
| key: rod-${{ runner.os }}-${{ hashFiles('go.sum') }}-v2 | |
| restore-keys: | | |
| rod-${{ runner.os }}- | |
| - name: Run integration tests with coverage | |
| run: | | |
| echo "ROD_NO_SANDBOX=$ROD_NO_SANDBOX" | |
| go test -race -tags=integration -coverprofile=coverage-integration.out -covermode=atomic ./... | |
| env: | |
| ROD_NO_SANDBOX: 1 | |
| - name: Upload integration coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage-integration.out | |
| flags: integration | |
| fail_ci_if_error: false | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Check formatting | |
| run: test -z "$(gofmt -l .)" || (gofmt -l . && exit 1) | |
| - name: Run go vet | |
| run: go vet ./... | |
| - name: Run staticcheck | |
| run: go tool staticcheck ./... | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Run gosec | |
| run: go tool gosec ./... | |
| examples: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Cache Rod browser | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/rod | |
| key: rod-${{ runner.os }}-${{ hashFiles('go.sum') }}-v2 | |
| restore-keys: | | |
| rod-${{ runner.os }}- | |
| - name: Build md2pdf | |
| run: go build -o md2pdf ./cmd/md2pdf | |
| - name: Generate example PDFs | |
| run: | | |
| ./md2pdf convert examples/simple-report.md -o /tmp/simple-test.pdf | |
| ./md2pdf convert -c examples/full-featured.yaml examples/full-featured.md -o /tmp/full-test.pdf | |
| env: | |
| ROD_NO_SANDBOX: 1 | |
| - name: Verify PDFs generated | |
| run: | | |
| test -f /tmp/simple-test.pdf && echo "simple-test.pdf: OK" | |
| test -f /tmp/full-test.pdf && echo "full-test.pdf: OK" | |
| ls -la /tmp/*.pdf | |
| build: | |
| needs: [lint, security, test-unit, test-integration, examples] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Build | |
| run: go build -v ./... |