feat:更新github actions
This commit is contained in:
parent
2af555dd3b
commit
62ea963003
@ -1,4 +1,4 @@
|
|||||||
name: Build & Test VSCode Extension
|
name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -12,7 +12,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -28,12 +28,9 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Build monorepo
|
- name: Build all
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Compile TypeScript
|
|
||||||
run: npx tsc
|
|
||||||
|
|
||||||
- name: Package VSIX
|
- name: Package VSIX
|
||||||
run: npx vsce package --out dist/openmcp.vsix
|
run: npx vsce package --out dist/openmcp.vsix
|
||||||
|
|
||||||
@ -43,18 +40,3 @@ jobs:
|
|||||||
name: openmcp-${{ matrix.os }}
|
name: openmcp-${{ matrix.os }}
|
||||||
path: dist/openmcp.vsix
|
path: dist/openmcp.vsix
|
||||||
|
|
||||||
# test:
|
|
||||||
# needs: build
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - name: Checkout code
|
|
||||||
# uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# - name: Setup Node.js
|
|
||||||
# uses: actions/setup-node@v4
|
|
||||||
# with:
|
|
||||||
# node-version: '22.x'
|
|
||||||
# cache: 'npm'
|
|
||||||
|
|
||||||
# - name: Install test dependencies
|
|
||||||
# run: npm install && npm run test
|
|
41
.github/workflows/test.yaml
vendored
Normal file
41
.github/workflows/test.yaml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '22.x'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Install xvfb (Linux only)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: sudo apt-get update && sudo apt-get install -y xvfb
|
||||||
|
|
||||||
|
- name: Run Test with XVFB (Linux)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: xvfb-run --auto-servernum npm run test
|
||||||
|
|
||||||
|
- name: Run Test (Windows/macOS)
|
||||||
|
if: runner.os != 'Linux'
|
||||||
|
run: npm run test
|
Loading…
x
Reference in New Issue
Block a user