clerk/.github/workflows/ci.yml (view raw)
| 1 | name: CI |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | pull_request: |
| 6 | |
| 7 | jobs: |
| 8 | test: |
| 9 | runs-on: ubuntu-latest |
| 10 | timeout-minutes: 10 |
| 11 | steps: |
| 12 | - uses: actions/checkout@v4 |
| 13 | - uses: actions/setup-go@v5 |
| 14 | with: |
| 15 | go-version-file: go.mod |
| 16 | |
| 17 | - run: go build ./... |
| 18 | - run: go vet ./... |
| 19 | |
| 20 | - name: Test with coverage |
| 21 | run: go test -coverprofile=coverage.out ./... |
| 22 | |
| 23 | - name: Coverage summary |
| 24 | run: go tool cover -func=coverage.out | tail -1 |
| 25 | |
| 26 | - name: Generate HTML coverage report |
| 27 | run: go tool cover -html=coverage.out -o coverage.html |
| 28 | |
| 29 | - uses: actions/upload-artifact@v4 |
| 30 | with: |
| 31 | name: coverage-report |
| 32 | path: | |
| 33 | coverage.html |
| 34 | coverage.out |
| 35 | |
| 36 | fuzz: |
| 37 | runs-on: ubuntu-latest |
| 38 | timeout-minutes: 10 |
| 39 | steps: |
| 40 | - uses: actions/checkout@v4 |
| 41 | - uses: actions/setup-go@v5 |
| 42 | with: |
| 43 | go-version-file: go.mod |
| 44 | |
| 45 | - name: Fuzz lexer |
| 46 | run: go test -fuzz=FuzzLexer -fuzztime=90s ./journal/lexer/ |
| 47 | |
| 48 | - name: Fuzz parser |
| 49 | run: go test -fuzz=FuzzParser -fuzztime=90s ./journal/parser/ |