Give up on running example in GitHub Actions for now
This commit is contained in:
@@ -27,7 +27,3 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
go test -v ./...
|
go test -v ./...
|
||||||
|
|
||||||
- name: Run example
|
|
||||||
run: |
|
|
||||||
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} go run ./example/cmd/example/main.go benkraft
|
|
||||||
|
|||||||
@@ -49,7 +49,9 @@ For a complete working example, see `example/`.
|
|||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
None yet -- instead just follow `example/README.md`'s instructions, and ensure that any diffs in that directory are intentional, and that the example still works.
|
`go test ./...` does some perfunctory tests. (This is run by GitHub Actions.)
|
||||||
|
|
||||||
|
TODO(benkraft): Figure out how to get GitHub Actions to run the example -- it needs a token.
|
||||||
|
|
||||||
## Major TODOs
|
## Major TODOs
|
||||||
|
|
||||||
@@ -64,8 +66,7 @@ Config options:
|
|||||||
- HTTP calling convention (is there enough variation to matter?)
|
- HTTP calling convention (is there enough variation to matter?)
|
||||||
|
|
||||||
Other:
|
Other:
|
||||||
- figure out and document go generate syntax
|
|
||||||
- error-checking/validation/etc. everywhere
|
- error-checking/validation/etc. everywhere
|
||||||
- tests
|
- more tests
|
||||||
- documentation
|
- documentation
|
||||||
- a name that's more clearly distinct from other libraries out there
|
- a name that's more clearly distinct from other libraries out there
|
||||||
|
|||||||
@@ -48,6 +48,12 @@ func Main() {
|
|||||||
}
|
}
|
||||||
graphqlClient := graphql.NewClient("https://api.github.com/graphql", &httpClient)
|
graphqlClient := graphql.NewClient("https://api.github.com/graphql", &httpClient)
|
||||||
|
|
||||||
|
viewerResp, err := getViewer(context.Background(), graphqlClient)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
fmt.Println("you are", *viewerResp.Viewer.MyName)
|
||||||
|
|
||||||
userResp, err := getUser(context.Background(), graphqlClient, username)
|
userResp, err := getUser(context.Background(), graphqlClient, username)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user