-
Notifications
You must be signed in to change notification settings - Fork 5
Set up CI #26
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
Open
expede
wants to merge
3
commits into
main
Choose a base branch
from
ci
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Set up CI #26
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| # Cancel in-progress runs for the same ref when a new commit lands. | ||
| concurrency: | ||
| group: ci-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| check: | ||
| name: Typecheck, lint, build | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up pnpm | ||
| # Reads the pnpm version from package.json#packageManager. | ||
| uses: pnpm/action-setup@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "24" | ||
| cache: pnpm | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Typecheck | ||
| run: pnpm typecheck | ||
|
|
||
| - name: Lint | ||
| run: pnpm lint | ||
|
|
||
| - name: Build | ||
| run: pnpm build | ||
|
|
||
| test: | ||
| name: Test (${{ matrix.name }}) | ||
| needs: check | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 25 | ||
| strategy: | ||
| # Always run both backends so a regression in one is visible even if the | ||
| # other fails first. | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| # WebSocket suite hits wss://sync3.automerge.org. | ||
| - name: WebSocket backend | ||
| script: test:websocket | ||
| # Subduction suite hits wss://subduction.sync.inkandswitch.com via | ||
| # the --sub flag (plus pure-unit Subduction tests). | ||
| - name: Subduction backend | ||
| script: test:subduction | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up pnpm | ||
| uses: pnpm/action-setup@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "24" | ||
| cache: pnpm | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build | ||
| # Several integration tests shell out to `dist/cli.js`, so the build | ||
| # artifact must exist before tests run. | ||
| run: pnpm build | ||
|
|
||
| - name: Test | ||
| run: pnpm run ${{ matrix.script }} | ||
| timeout-minutes: 20 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| // Minimal ESLint flat config for pushwork. | ||
| // | ||
| // Goal: catch genuine bugs (undeclared bindings, unreachable code, etc.) without | ||
| // nitpicking existing style — formatting belongs to Prettier (.prettierrc). | ||
| // | ||
| // Most stylistic rules from typescript-eslint's `recommended` set are toned down | ||
| // here so this can run green on the existing codebase. Tighten over time. | ||
| import tseslint from "typescript-eslint"; | ||
|
|
||
| export default tseslint.config( | ||
| { | ||
| ignores: ["dist/**", "node_modules/**", "coverage/**", "**/*.d.ts"], | ||
| }, | ||
| ...tseslint.configs.recommended, | ||
| { | ||
| rules: { | ||
| "@typescript-eslint/ban-ts-comment": "off", | ||
| "@typescript-eslint/no-empty-object-type": "off", | ||
| "@typescript-eslint/no-explicit-any": "off", | ||
| "@typescript-eslint/no-non-null-assertion": "off", | ||
| "@typescript-eslint/no-require-imports": "off", | ||
| "@typescript-eslint/no-unused-expressions": "off", | ||
| "@typescript-eslint/no-unused-vars": [ | ||
| "warn", | ||
| { | ||
| argsIgnorePattern: "^_", | ||
| varsIgnorePattern: "^_", | ||
| caughtErrorsIgnorePattern: "^_", | ||
| }, | ||
| ], | ||
| "no-empty": ["warn", { allowEmptyCatch: true }], | ||
| // `ignoreReadBeforeAssign` keeps the rule from flagging the legitimate | ||
| // pattern where a `let` is declared first so it can be captured by a | ||
| // closure defined immediately afterward, and is then assigned later | ||
| // (e.g. `let timer; const cleanup = () => clearTimeout(timer); timer = setTimeout(...)`). | ||
| // Rewriting those to `const` would force restructuring just to silence | ||
| // the lint without any real readability gain. | ||
| "prefer-const": ["warn", { ignoreReadBeforeAssign: true }], | ||
| }, | ||
| }, | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.