Currently have something like:
await connect(async (client) => {
console.log("Running tests...");
const start = Date.now();
const nodeCache = client.cacheVolume("node")
const appCtr = client
.pipeline("build-and-run")
.container()
.from("oven/bun")
.withDirectory("/app", client.host().directory('.'), { exclude: ["node_modules/", "ci/"] })
.withMountedCache("/app/node_modules", nodeCache)
.withWorkdir("/app")
.withExec(["bun", "install"])
.withEnvVariable("PORT", "3000")
.withExec(["bun", "start"])
.withExposedPort(3000);
and this in my actions yml:
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Run Dagger Tests
run: node dagger.js