Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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: 2 additions & 0 deletions .changeset/proud-pants-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
98 changes: 76 additions & 22 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,62 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
name: Detect changed paths
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
- uses: actions/checkout@v4
Comment thread
cameri marked this conversation as resolved.
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

dorny/paths-filter relies on git history for non-PR events (e.g., push), but actions/checkout here uses the default shallow clone. Configure actions/checkout with an appropriate fetch-depth (commonly 0 or at least 2) so the action can diff github.event.before..after reliably.

Suggested change
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 0

Copilot uses AI. Check for mistakes.
with:
fetch-depth: 0
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
src:
- 'src/**'
- 'test/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig*.json'
- 'biome.json'
- '.knip.json'
- 'Dockerfile*'
- 'docker-compose*.yml'
- '.nvmrc'
- '.github/workflows/checks.yml'

commit-lint:
name: Lint commits
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install package dependencies
run: npm ci
- name: Run commitlint
uses: wagoid/commitlint-github-action@v5

lint:
name: Lint code
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.src == 'true'
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
Expand All @@ -44,31 +77,39 @@ jobs:
run: npm run lint
- name: Run Knip
run: npm run knip

build-check:
name: Build check
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.src == 'true'
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install package dependencies
run: npm ci
- name: Run build check
run: npm run build:check

test-units-and-cover:
name: Unit Tests And Coverage
runs-on: ubuntu-latest
needs:
- commit-lint
- changes
- lint
- build-check
if: |
needs.changes.outputs.src == 'true' &&
needs.lint.result == 'success' &&
needs.build-check.result == 'success'
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
Expand All @@ -86,24 +127,29 @@ jobs:
name: unit-coverage-lcov
path: .coverage/unit/lcov.info
- name: Coveralls
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2.3.6
if: ${{ always() }}
with:
path-to-lcov: ./.coverage/unit/lcov.info
flag-name: Unit
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true

test-integrations-and-cover:
name: Integration Tests and Coverage
runs-on: ubuntu-latest
needs:
- commit-lint
- changes
- lint
- build-check
if: |
needs.changes.outputs.src == 'true' &&
needs.lint.result == 'success' &&
needs.build-check.result == 'success'
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Run integration tests
Expand All @@ -118,7 +164,7 @@ jobs:
- name: Run coverage for integration tests
run: npm run docker:cover:integration
- name: Coveralls
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2.3.6
if: ${{ always() }}
with:
path-to-lcov: .coverage/integration/lcov.info
Expand All @@ -131,27 +177,35 @@ jobs:
with:
name: integration-coverage-lcov
path: .coverage/integration/lcov.info

post-tests:
name: Post Tests
needs: [test-units-and-cover, test-integrations-and-cover]
runs-on: ubuntu-latest
needs:
- changes
- test-units-and-cover
- test-integrations-and-cover
if: ${{ always() }}
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
- name: Coveralls Finished
uses: coverallsapp/github-action@v2.3.6
if: |
needs.test-units-and-cover.result != 'skipped' ||
needs.test-integrations-and-cover.result != 'skipped'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
Comment on lines +190 to +197
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

coverallsapp/github-action@master is a floating ref, which is risky for supply-chain security and can introduce unexpected CI changes. Pin this to a stable release tag or (preferably) a commit SHA.

Copilot uses AI. Check for mistakes.

changeset-check:
name: Changeset Required
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.head_ref != 'changeset-release/main'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
Expand Down
87 changes: 87 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@
"relay",
"typescript"
],
"author": "Ricardo Arturo Cabral Mej\u00eda (npub1qqqqqqyz0la2jjl752yv8h7wgs3v098mh9nztd4nr6gynaef6uqqt0n47m)",
"author": "Ricardo Arturo Cabral Mejía (npub1qqqqqqyz0la2jjl752yv8h7wgs3v098mh9nztd4nr6gynaef6uqqt0n47m)",
"license": "MIT",
"bugs": {
"url": "https://github.com/cameri/nostream/issues"
},
"homepage": "https://github.com/cameri/nostream#readme",
"devDependencies": {
"@biomejs/biome": "^2.4.11",
"@changesets/changelog-github": "0.6.0",
"@changesets/cli": "^2.27.12",
"@commitlint/cli": "17.2.0",
"@commitlint/config-conventional": "17.2.0",
Expand Down