🌱 initial collect-assets script #399
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI (repo level) | |
on: | |
push: | |
branches: | |
- "main" | |
- "release-*" | |
pull_request: | |
paths-ignore: | |
- "docs/**" | |
branches: | |
- "main" | |
- "release-*" | |
workflow_dispatch: | |
workflow_call: | |
concurrency: | |
group: ci-repo-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
# https://typicode.github.io/husky/how-to.html#ci-server-and-docker | |
env: | |
HUSKY: 0 | |
jobs: | |
build: | |
name: Build (${{ matrix.arch }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: linux | |
- os: macos-latest | |
arch: macos | |
- os: windows-latest | |
arch: windows | |
max-parallel: 3 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
node_modules | |
vscode/node_modules | |
webview-ui/node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
- name: Install workspace dependencies | |
run: | | |
npm ci | |
- name: Lint sources | |
run: npm run lint | |
test: | |
name: Test (${{ matrix.arch }}) | |
runs-on: ${{ matrix.os }} | |
needs: build | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: linux | |
- os: macos-latest | |
arch: macos | |
- os: windows-latest | |
arch: windows | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Install workspace dependencies | |
run: | | |
npm ci | |
# Run tests on Linux | |
- name: Run tests (Linux) | |
if: matrix.arch == 'linux' | |
run: xvfb-run -a npm test | |
# Run tests on macOS | |
- name: Run tests (macOS) | |
if: matrix.arch == 'macos' | |
run: npm test | |
# Run tests on Windows | |
- name: Run tests (Windows) | |
if: matrix.arch == 'windows' | |
shell: cmd | |
run: npm test | |
package: | |
name: Package (${{ matrix.arch }}) | |
runs-on: ${{ matrix.os }} | |
needs: test | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: linux | |
- os: macos-latest | |
arch: macos | |
- os: windows-latest | |
arch: windows | |
max-parallel: 3 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Install workspace dependencies | |
run: npm ci | |
- name: Build Package | |
run: npm run package | |
- name: Generate .vsix package | |
working-directory: ./vscode | |
run: | | |
npm install @vscode/vsce | |
npx vsce package | |
- name: Upload VSIX artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vscode-extension-${{ matrix.arch }} | |
path: "vscode/*.vsix" |