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
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
day: monday
groups:
development-dependencies:
dependency-type: development
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: monday
groups:
actions:
patterns: ["*"]
70 changes: 58 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,85 @@ on:
schedule:
- cron: "0 8 * * 1"

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

permissions:
contents: read

jobs:
check:
node-compatibility:
name: Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
node-version: [18, 20, 22, 24]
node-version: ["18", "20", "22", "24"]
steps:
- name: Check out repository
uses: actions/checkout@v4

uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}

- name: Run checks
cache: npm
- name: Install locked dependencies
run: npm ci
- name: Run syntax and unit tests
run: npm run check

quality-contracts:
name: Quality and package contracts
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
cache: npm
- name: Install locked dependencies
run: npm ci
- name: Run tests with coverage
run: npm run test:coverage

- name: Compile installed-package type contracts
run: npm run type:check
- name: Prove critical tests kill safety regressions
run: npm run test:mutation
- name: Run behavior and efficiency benchmark
run: npm run benchmark:behavior

- name: Run package smoke test
- name: Run source package smoke test
run: npm run smoke

- name: Verify installed tarball host contract
run: npm run smoke:packed-host

- name: Verify installed tarball tool contract
run: npm run smoke:packed-tools
- name: Audit production dependencies
run: npm audit --omit=dev --audit-level=high
- name: Verify package contents
run: npm run pack:check

filesystem-compatibility:
name: Filesystem (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Check out repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
cache: npm
- name: Install locked dependencies
run: npm ci
- name: Run portable lifecycle and filesystem tests
run: node --test test/host-lifecycle.test.js test/persistence-lease.test.js test/public-hook-cancellation.test.js
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:
pull_request:
push:
branches: [main]
schedule:
- cron: "30 8 * * 1"

permissions:
contents: read
security-events: write

jobs:
analyze:
name: JavaScript analysis
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Initialize CodeQL
uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
with:
languages: javascript-typescript
- name: Analyze
uses: github/codeql-action/analyze@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
38 changes: 38 additions & 0 deletions .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release check

on:
push:
tags: ["v*"]
workflow_dispatch:

permissions:
contents: read

jobs:
verify-artifact:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
cache: npm
- name: Verify tag and package versions match
if: startsWith(github.ref, 'refs/tags/')
run: node -e "const p=require('./package.json');const t=process.env.GITHUB_REF_NAME;if(t!=='v'+p.version)throw new Error('tag '+t+' does not match package '+p.version)"
- name: Install locked dependencies
run: npm ci
- name: Run complete release gate
run: npm run release:check
- name: Build npm artifact
run: npm pack
- name: Upload verified artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: npm-package-${{ github.ref_name }}
path: opencode-goal-plugin-*.tgz
if-no-files-found: error
retention-days: 30
Loading
Loading