Give up on running example in GitHub Actions for now

This commit is contained in:
Ben Kraft
2020-03-27 16:27:08 -07:00
parent 8df2900607
commit 6caa3fc6c4
3 changed files with 10 additions and 7 deletions
-4
View File
@@ -27,7 +27,3 @@ jobs:
- name: Run tests
run: |
go test -v ./...
- name: Run example
run: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} go run ./example/cmd/example/main.go benkraft
+4 -3
View File
@@ -49,7 +49,9 @@ For a complete working example, see `example/`.
## 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
@@ -64,8 +66,7 @@ Config options:
- HTTP calling convention (is there enough variation to matter?)
Other:
- figure out and document go generate syntax
- error-checking/validation/etc. everywhere
- tests
- more tests
- documentation
- a name that's more clearly distinct from other libraries out there
+6
View File
@@ -48,6 +48,12 @@ func Main() {
}
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)
if err != nil {
return