Skip to content
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

fixup test runner #8

Merged
merged 9 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ jobs:
df -h
- uses: actions/checkout@v3
- run: yarn global add tsx
- name: generate Dockerfile
run: ./makeDockerfile.ts
- name: build test images
run: ./buildTestImages.ts
- name: run test images
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ To add a proposal, see [./CONTRIBUTING.md]

- [ ] include a way to test soft patches that weren't proposals (e.g. PismoB)
- [ ] documentation and tooling for debugging
- [ ] separate console output for agd and the scripts (had been with tmux before but trouble, try Docker compose)
- [ ] remove use of `agoric-sdk:dev`; that's a concern of SDK
- [ ] separate agd and actions/test services with docker-compose (https://github.com/Agoric/agoric-sdk/discussions/8480#discussioncomment-7438329)
- [ ] separate console output for agd and the scripts (had been with tmux before but trouble, try Docker compose https://github.com/Agoric/agoric-sdk/discussions/8480#discussioncomment-7438329)
- [ ] way to query capdata in one shot (not resorting to follow jsonlines hackery)
- [ ] within each proposal, separate dirs for supporting files so images don't invalidate
3 changes: 3 additions & 0 deletions buildTestImages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import { parseArgs } from 'node:util';
import { execSync } from 'node:child_process';
import { imageNameForProposalTest, readProposals } from './common';
import { refreshDockerfile } from './makeDockerfile';

refreshDockerfile();

const options = {
match: { short: 'm', type: 'string' },
Expand Down
10 changes: 8 additions & 2 deletions makeDockerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,11 @@ for (const proposal of readProposals()) {
previousProposal = proposal;
}

const contents = blocks.join('\n');
fs.writeFileSync('Dockerfile', contents);
export function refreshDockerfile() {
const contents = blocks.join('\n');
fs.writeFileSync('Dockerfile', contents);
}

if (require.main === module) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we used ES modules and node doesn't support this idiom in that context.

Does .ts not get compiled to ES modules?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node only uses ESM if package.json has "type": "module". But there's no package.json here so it defaults to CJS

refreshDockerfile();
}
Loading