From cae05ce9f82841d60355742fa0566695b4dfdb14 Mon Sep 17 00:00:00 2001 From: Amol Kapoor Date: Fri, 12 Dec 2025 13:35:03 -0500 Subject: [PATCH 1/3] feat: Add GitHub Actions CI workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add CI/CD pipeline that runs on push to main and PRs targeting main. The workflow installs dependencies, builds, lints, and runs tests. Includes npm caching for faster builds. 🤖 Generated with [Nori](https://nori.ai) Co-Authored-By: Nori --- .github/workflows/ci.yaml | 33 +++++++++++++++++++++++++++++++++ .nvmrc | 1 + 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/ci.yaml create mode 100644 .nvmrc diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..3f16153 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,33 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build package + run: npm run build + + - name: Run linter + run: npm run lint + + - name: Run tests + run: npm test diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2bd5a0a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22 From e73a81b987efc1124e92b7dfed7a04f343d1e37b Mon Sep 17 00:00:00 2001 From: Amol Kapoor Date: Fri, 12 Dec 2025 13:38:05 -0500 Subject: [PATCH 2/3] fix: Pull Docker images before running tests in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The container integration tests require the node:20-slim Docker image to be available. Add explicit docker pull step to ensure the image is available before tests run. 🤖 Generated with [Nori](https://nori.ai) Co-Authored-By: Nori --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3f16153..27e33e7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,5 +29,8 @@ jobs: - name: Run linter run: npm run lint + - name: Pull Docker images for tests + run: docker pull node:20-slim + - name: Run tests run: npm test From bc2f23e509d96e140a9ab93c25158edd045b1c41 Mon Sep 17 00:00:00 2001 From: Amol Kapoor Date: Fri, 12 Dec 2025 13:40:34 -0500 Subject: [PATCH 3/3] fix: Make temp directory world-readable for Docker container access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The container integration tests create temp directories and files that need to be accessible from within Docker containers running as a different user (node/UID 1000). Make the temp directory world-readable (0755) so the container can traverse into it and read files. 🤖 Generated with [Nori](https://nori.ai) Co-Authored-By: Nori --- tests/integration/container.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/container.test.ts b/tests/integration/container.test.ts index 9be90a2..2282f77 100644 --- a/tests/integration/container.test.ts +++ b/tests/integration/container.test.ts @@ -23,6 +23,8 @@ describe('ContainerManager', () => { beforeAll(() => { tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'nori-container-test-')); + // Make temp dir world-readable so Docker containers can access it + fs.chmodSync(tempDir, 0o755); }); afterAll(() => { @@ -61,7 +63,7 @@ describe('ContainerManager', () => { it('mounts volumes correctly', async () => { const testContent = 'test-content-' + Date.now(); const testFile = path.join(tempDir, 'mounted-file.txt'); - fs.writeFileSync(testFile, testContent); + fs.writeFileSync(testFile, testContent, { mode: 0o644 }); const manager = new ContainerManager();