Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaydubina committed Aug 22, 2024
1 parent 0b71ef1 commit 2072cff
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 46 deletions.
48 changes: 29 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
name: Tests
name: Tests

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

permissions: read-all

jobs:

build:
name: Tests
name: Tests
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Test
run: make test

- name: Codecov
uses: codecov/[email protected]
- name: code
uses: actions/checkout@v4

- name: go
uses: actions/setup-go@v5
with:
go-version: ^1.21

- name: test
run: |
go get -v -t -d ./...
go install github.com/jstemmer/go-junit-report/v2@latest
go test -coverprofile=coverage.out -covermode=atomic -cover -json -v ./... 2>&1 | go-junit-report -set-exit-code > tests.xml
- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: tests.xml

- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
27 changes: 0 additions & 27 deletions Makefile

This file was deleted.

19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,22 @@ $ cat k8s_pod_owners_details.jsonl | jq '. as $in | reduce leaf_paths as $path (

Currently only Graphviz is supported.
Follow progress of native Go graph rendering in [github.com/nikolaydubina/go-graph-layout](https://github.com/nikolaydubina/go-graph-layout). Once it is ready, it will be integrated into this project.

## Generate Docs

```bash
cat testdata/gin.jsonl | ./jsonl-graph > testdata/gin_nocolor.dot
cat testdata/gin_nocolor.dot | dot -Tsvg > testdata/gin_nocolor.svg
cat testdata/gin.jsonl | ./jsonl-graph -color-scheme=file://$$PWD/testdata/colors.json > testdata/gin_color.dot
cat testdata/gin_color.dot | dot -Tsvg > testdata/gin_color.svg
cat testdata/small.jsonl | ./jsonl-graph > testdata/small.dot
cat testdata/small.dot | dot -Tsvg > testdata/small.svg
cat testdata/small.jsonl | ./jsonl-graph -lr > testdata/small_lr.dot
cat testdata/small_lr.dot | dot -Tsvg > testdata/small_lr.svg
cat testdata/small.jsonl | ./jsonl-graph -tb > testdata/small_tb.dot
cat testdata/small_tb.dot | dot -Tsvg > testdata/small_tb.svg
cat testdata/k8s_pod_owners.jsonl | ./jsonl-graph > testdata/k8s_pod_owners.dot
cat testdata/k8s_pod_owners.dot | dot -Tsvg > testdata/k8s_pod_owners.svg
cat testdata/k8s_pod_owners_details.jsonl | ./jsonl-graph > testdata/k8s_pod_owners_details.dot
cat testdata/k8s_pod_owners_details.dot | dot -Tsvg > testdata/k8s_pod_owners_details.svg
```

0 comments on commit 2072cff

Please sign in to comment.