posit-dev / posit-dev/positron-api-pkg

Add CI workflow to run tests on PRs and pushes

Open
#7 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area: api
Dominant language
HTML
Stars
1
Forks
0
Avg merge
1m
Merged PRs (30d)
3

Description

Context

From the PR #6 review, @juliasilge suggested adding CI to run the test suite:

Would it make sense to add some CI to run the tests? Not in this PR but sometime soon?

Currently the repo only has a release.yml workflow for publishing. There is no CI that runs tests on PRs or pushes.

Proposed

Add a GitHub Actions workflow (e.g. .github/workflows/ci.yml) that:

  • Triggers on pushes to main and pull requests targeting main
  • Runs the test suite (npm test) which includes:
    • Unit tests (runtime functions, type definitions, strip-proposed-types)
    • Integration tests (npm pack + tsc --noEmit under multiple tsconfig configurations)
  • Tests across Node versions (e.g. 18, 20, 22)
  • Requires the Positron source repo -- the build step copies type definitions from ../positron/src/positron-dts/, so the workflow will need to check out the Positron repo as a sibling directory

Notes

The sibling-repo dependency is the main complexity here. Options include:

  1. Checking out posit-dev/positron in the workflow (large repo, may need sparse checkout)
  2. Caching or vendoring just the needed .d.ts files
  3. Using the already-committed dist/ files for test-only runs (skipping the gather step)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading .github/workflows/release.yml and running npm test locally to understand the existing test suite and its dependency on ../positron/src/positron-dts/. Design the new workflow around pushes and pull requests to main, Node 18, 20, and 22, and the sibling Positron checkout or another documented dependency approach. Done means the workflow runs npm test successfully across the requested Node versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, node.js, typescript
Domain
ci-cd, devops, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.