mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-11-16 17:09:09 +00:00
# Conflicts: # .github/workflows/opencode-plugin-ci.yml # .github/workflows/opencode-provider-ci.yml
92 lines
2.6 KiB
YAML
92 lines
2.6 KiB
YAML
name: opencode-plugin CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, "release/**"]
|
|
paths:
|
|
- "@omniroute/opencode-plugin/**"
|
|
- "@omniroute/opencode-plugin-v2/**"
|
|
- ".github/workflows/opencode-plugin-ci.yml"
|
|
pull_request:
|
|
branches: [main, "release/**"]
|
|
paths:
|
|
- "@omniroute/opencode-plugin/**"
|
|
- "@omniroute/opencode-plugin-v2/**"
|
|
- ".github/workflows/opencode-plugin-ci.yml"
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: "@omniroute/opencode-plugin"
|
|
|
|
jobs:
|
|
test:
|
|
name: Test (Node ${{ matrix.node }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: ["22.23.4", "24.22.1"]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
package-manager-cache: false
|
|
- run: npm ci --no-audit --no-fund
|
|
- run: npm run build
|
|
- run: npm test
|
|
|
|
test-v2:
|
|
name: Test v2 (Node ${{ matrix.node }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: ["22.23.4", "24.22.1"]
|
|
defaults:
|
|
run:
|
|
working-directory: "@omniroute/opencode-plugin-v2"
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
package-manager-cache: false
|
|
- run: npm ci --no-audit --no-fund
|
|
- run: npm run build
|
|
- run: npm test
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
needs: [test, test-v2]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
|
with:
|
|
node-version: "24.22.1"
|
|
package-manager-cache: false
|
|
- name: Build plugin-v2 artifact
|
|
working-directory: "@omniroute/opencode-plugin-v2"
|
|
run: npm ci --no-audit --no-fund && npm run build
|
|
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
|
with:
|
|
name: opencode-plugin-v2-dist
|
|
path: "@omniroute/opencode-plugin-v2/dist"
|
|
retention-days: 7
|