-
Notifications
You must be signed in to change notification settings - Fork 0
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
PP-11224: Add Dockerfile, config, and unit test workflow #2
Conversation
I tried to add otel-config-validator to test the config however....
|
a233fae
to
a5a4512
Compare
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | ||
- name: Docker build | ||
run: | | ||
docker build -t pay-adot:github-tests . |
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.
Should we tag the build with the SHA (like we do on the telegraf tests)?
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 don't think it's needed, we're not actually putting this image anywhere so the tag is completely ephemeral anyway
"express": "^4.18.2", | ||
"prom-client": "^14.2.0" | ||
} | ||
} |
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.
Can we add config for these npm packages into dependabot.yml
? (The usual open-pull-requests-limit: 0
)
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.
Oh yeah, totally forgot about the npm deps (I wasn't going to have any until the otel config validator didn't work :()
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.
Added in 094eabd
tests/node_service/index.mjs
Outdated
@@ -0,0 +1,68 @@ | |||
import { randomUUID } from 'crypto' |
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.
Is this used?
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.
Oh it's not anymore 🤔 I did have it previously and decided it was pointless. I'll remove 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.
Been playing around with the tests locally, looks good! I ran into a minor bit of confusion when trying to make the tests fail on purpose, but realised it was because docker-compose hadn't rebuilt the test-app
image for me (and I had to delete it manually). In practice I think this will be fine - GHA will not have any cached images lying around.
Yeah I think I will add |
@katstevens I've done the couple of updates (removed the unused import, added the docker-compose build). Would you mind re-reviewing? |
Add initial Dockerfile, config, and a workflows to test and tag releases.
You can test this locally by going into the tests/ directory and running
./test.sh
(You will need jq installed)