Skip to content

Switch to node-tree-sitter #51

Switch to node-tree-sitter

Switch to node-tree-sitter #51

Workflow file for this run

name: Pull request checks
on:
pull_request:
env:
TEST_TIMEOUT: 5m
EXAMPLE_TIMEOUT: 5m
BRANCH: ${{ startsWith(github.head_ref, '') && github.head_ref || github.ref_name }}
jobs:
test:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install extension dependencies
run: yarn run install:all
- name: Build webview
if: matrix.os != 'macos-latest'
run: yarn run build:webview
# TODO: fix this command getting stuck on macos
- name: Build webview
if: matrix.os == 'macos-latest'
uses: nick-fields/retry@v2
with:
timeout_minutes: 1
max_attempts: 5
command: yarn run build:webview
- name: Run tests
uses: coactions/setup-xvfb@v1
with:
run: yarn test
examples:
name: Build examples
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install asset generation dependencies
run: sudo apt install -y ffmpeg libnss3 xvfb
- name: Install extension dependencies
run: yarn run install:all
- name: Build webview
run: yarn run build:webview
- name: Build extension
run: yarn run compile
- name: Setting global vscode settings
run: cp -r ./out/examples/examples-editor/.vscode ~/.vscode
- name: Generate assets
run: |
chmod +x ./generate-assets.sh
chmod +x ./generate-example-asset.sh
./generate-assets.sh ./out/examples .
- name: Upload assets
uses: actions/upload-artifact@v3
with:
name: ${{ env.BRANCH }}-assets
path: |
*.gif