New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.github: add tests to CI #82
Conversation
.github/workflows/test-sqlite.yml
Outdated
|
||
on: | ||
push: | ||
branches: [ $default-branch ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work here? I thought this was only for templates.
Do we need ${{ github.event.repository.default_branch }}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look, all I do is copy the yaml from one file to another file. none of this makes any sense to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooh it worked this time!
lmk if you have a shorter form of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I mean I just put in the specific name. It's not like default branch names change all that often anyway.
4cf1d93
to
b46370c
Compare
.github/workflows/test-sqlite.yml
Outdated
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider maybe also
types: [opened, reopened, synchronize]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does that do? (it seems to re-run on pushing to a PR already)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant that instead of specifying the branch for a PR, since we presumably want the tests to run not just for main.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be more specific:
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
(syntax mutatis mutandis)
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
permissions: | |
contents: read | |
though it is possible that is the default now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is. Going to skip this on the principle that fewer lines is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the default is read-all
, which is more general (e.g., it allows access to readable properties of the repo besides the files), but that is probably not a big issue.
b46370c
to
3c19dab
Compare
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -v ./... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-race
? 😄
3c19dab
to
9bde6c0
Compare
@creachadair i bumped this, added race as you suggested, LGTY? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had forgotten about the existence of this PR, but yes, still LGTM. 😆
No description provided.