Skip to content

chore: Add support for running tests & prettier in CI #85

chore: Add support for running tests & prettier in CI

chore: Add support for running tests & prettier in CI #85

Workflow file for this run

# Build & lint checks workflow
name: Build & Lint checks
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout experimentation plugin
uses: actions/checkout@v4
with:
path: main
- name: Checkout core Blockly
uses: actions/checkout@v4
with:
repository: 'google/blockly'
ref: 'rc/v12.0.0'
path: core-blockly
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: NPM install
run: |
cd main
npm install
cd ..
cd core-blockly
npm install
cd ..
- name: Link latest Blockly v12
run: |
cd core-blockly
npm run package
cd dist
npm link
cd ../../main
npm link blockly
cd ..
- name: Verify build
run: |
cd main
npm run build
lint:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: NPM install
run: npm install
- name: Eslint check format
run: npm run lint
format:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: NPM install
run: npm install
- name: Prettier check format
run: npm run format:check