Skip to content
Merged
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
41 changes: 38 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,26 @@ on:
pull_request:
branches: [main, develop]

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
dependency-review:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- uses: actions/dependency-review-action@v4
with:
fail-on-severity: high

audit:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -50,9 +69,19 @@ jobs:
else
npm run test:coverage
fi
- name: Upload coverage
if: matrix.node-version == 22
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
- name: Coverage report on PR
if: matrix.node-version == 22 && github.event_name == 'pull_request'
uses: davelosert/vitest-coverage-report-action@v2
- run: npx tsc --noEmit

bench:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
Expand All @@ -76,7 +105,7 @@ jobs:
run: npm run test:e2e

publish:
needs: [audit, lint, test, e2e]
needs: [audit, lint, test, bench, e2e]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
Expand All @@ -100,9 +129,15 @@ jobs:
exit 1
fi

- name: Validate changelog entry
run: |
TAG_VERSION="${GITHUB_REF_NAME#v}"
if ! grep -q "## \[${TAG_VERSION}\]" CHANGELOG.md; then
echo "::error::No CHANGELOG.md entry found for version ${TAG_VERSION}"
exit 1
fi

- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Extract release notes
id: release_notes
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CodeQL

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
- cron: '0 6 * * 1'

jobs:
analyze:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v6

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: javascript-typescript

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Loading