Skip to content

chore(ci): Add workflow for PR's #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Build, Test, Lint & e2e pushes.
# TODO: use the .nvmrc for node versions
# https://github.com/actions/setup-node/issues/32
name: CI

on:
# support manual trigger of this workflow
workflow_dispatch:

# run this build action for all pushes to main
push:
branches: ['master']

# also run for pull requests that target main
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
env:
CI: true

steps:
# Setup steps
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install npm
run: npm install

- name: Build
run: npm run package

- name: Lint
run: echo npm run lint

- name: Test
run: echo npm run test

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
node_modules
.vscode-test
out
package-lock.json
package-lock.json
.DS_Store
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.13.0
340 changes: 171 additions & 169 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,171 +1,173 @@
{
"name": "beeb-vsc",
"displayName": "Beeb VSC",
"description": "6502 developmemnt environment (BBC Micro/BeebAsm)",
"version": "0.1.0",
"icon": "images/icon.png",
"galleryBanner": {
"color": "#5c2d91",
"theme": "dark"
},
"publisher": "simondotm",
"license": "MIT",
"bugs": {
"url": "https://github.com/simondotm/beeb-vsc/issues"
},
"homepage": "https://github.com/simondotm/beeb-vsc/",
"repository": {
"type": "git",
"url": "https://github.com/simondotm/beeb-vsc.git"
},
"sponsor": {
"url": "https://ko-fi.com/simondotm"
},
"categories": [
"Programming Languages"
],
"keywords": [
"6502",
"bbc",
"micro",
"beebasm",
"assembly"
],
"engines": {
"vscode": "^1.75.0"
},
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--require",
"ts-node/register",
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
"--recursive",
"${workspaceFolder}/server/src/test/*.ts"
],
"internalConsoleOptions": "openOnSessionStart"
}
],
"main": "./out/main.js",
"contributes": {
"languages": [
{
"id": "beebasm",
"extensions": [
".6502",
".s",
".asm"
],
"aliases": [
"6502/BeebAsm Assembly"
],
"configuration": "./beeb-vsc.configuration.json"
}
],
"grammars": [
{
"language": "beebasm",
"scopeName": "source.asm.6502",
"path": "./syntaxes/6502.tmLanguage.json"
}
],
"configuration": {
"type": "object",
"title": "BeebVSC configuration",
"properties": {
"beebvsc.assembler": {
"type": "string",
"default": "BeebAsm.exe",
"description": "Your assembler executable (eg. BeebAsm.exe)."
},
"beebvsc.emulator": {
"type": "string",
"default": "BeebEm.exe",
"description": "Your preferred emulator executable (eg. BeebEm.exe)."
}
}
},
"commands": [
{
"command": "extension.target.create",
"title": "BeebVSC: Create new build target"
},
{
"command": "extension.target.select",
"title": "BeebVSC: Select default build target"
},
{
"command": "extension.target.run",
"title": "BeebVSC: Run the currently selected target"
},
{
"command": "extension.target.build",
"title": "BeebVSC: Build the currently selected target"
}
],
"keybindings": [
{
"command": "extension.target.create",
"key": "f10",
"mac": "f10"
},
{
"command": "extension.target.select",
"key": "f6",
"mac": "f6"
},
{
"command": "extension.target.run",
"key": "Ctrl+Shift+T",
"mac": "Ctrl+Shift+T"
},
{
"command": "extension.target.run",
"key": "F9",
"mac": "F9"
},
{
"command": "extension.target.build",
"key": "F7",
"mac": "F7"
},
{
"command": "workbench.action.tasks.runTask",
"key": "Ctrl+Shift+R",
"mac": "Ctrl+Shift+R"
}
]
},
"scripts": {
"vscode:prepublish": "npm-run-all --parallel \"esbuild-base -- --minify\" \"esbuild-server -- --minify\"",
"esbuild-base": "esbuild ./client/src/extension.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node",
"esbuild-server": "esbuild ./server/src/server.ts --bundle --outfile=out/server.js --external:vscode --format=cjs --platform=node",
"compile-for-tests": "tsc -b -w",
"esbuild": "npm-run-all --parallel \"esbuild-base -- --sourcemap\" \"esbuild-server -- --sourcemap\"",
"esbuild-watch": "npm-run-all --parallel \"esbuild-base -- --sourcemap --watch\" \"esbuild-server -- --sourcemap --watch\" \"compile-for-tests\"",
"lint": "eslint ./client/src ./server/src --ext .ts,.tsx",
"postinstall": "cd client && npm install && cd ../server && npm install && cd .."
},
"devDependencies": {
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.5",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"esbuild": "^0.19.11",
"eslint": "^8.56.0",
"mocha": "^10.2.0",
"npm-run-all": "^4.1.5",
"typescript": "^5.3.3"
},
"dependencies": {
"source-map-support": "^0.5.21"
}
"name": "beeb-vsc",
"displayName": "Beeb VSC",
"description": "6502 developmemnt environment (BBC Micro/BeebAsm)",
"version": "0.1.0",
"icon": "images/icon.png",
"galleryBanner": {
"color": "#5c2d91",
"theme": "dark"
},
"publisher": "simondotm",
"license": "MIT",
"bugs": {
"url": "https://github.com/simondotm/beeb-vsc/issues"
},
"homepage": "https://github.com/simondotm/beeb-vsc/",
"repository": {
"type": "git",
"url": "https://github.com/simondotm/beeb-vsc.git"
},
"sponsor": {
"url": "https://ko-fi.com/simondotm"
},
"categories": [
"Programming Languages"
],
"keywords": [
"6502",
"bbc",
"micro",
"beebasm",
"assembly"
],
"engines": {
"vscode": "^1.75.0"
},
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--require",
"ts-node/register",
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
"--recursive",
"${workspaceFolder}/server/src/test/*.ts"
],
"internalConsoleOptions": "openOnSessionStart"
}
],
"main": "./out/main.js",
"contributes": {
"languages": [
{
"id": "beebasm",
"extensions": [
".6502",
".s",
".asm"
],
"aliases": [
"6502/BeebAsm Assembly"
],
"configuration": "./beeb-vsc.configuration.json"
}
],
"grammars": [
{
"language": "beebasm",
"scopeName": "source.asm.6502",
"path": "./syntaxes/6502.tmLanguage.json"
}
],
"configuration": {
"type": "object",
"title": "BeebVSC configuration",
"properties": {
"beebvsc.assembler": {
"type": "string",
"default": "BeebAsm.exe",
"description": "Your assembler executable (eg. BeebAsm.exe)."
},
"beebvsc.emulator": {
"type": "string",
"default": "BeebEm.exe",
"description": "Your preferred emulator executable (eg. BeebEm.exe)."
}
}
},
"commands": [
{
"command": "extension.target.create",
"title": "BeebVSC: Create new build target"
},
{
"command": "extension.target.select",
"title": "BeebVSC: Select default build target"
},
{
"command": "extension.target.run",
"title": "BeebVSC: Run the currently selected target"
},
{
"command": "extension.target.build",
"title": "BeebVSC: Build the currently selected target"
}
],
"keybindings": [
{
"command": "extension.target.create",
"key": "f10",
"mac": "f10"
},
{
"command": "extension.target.select",
"key": "f6",
"mac": "f6"
},
{
"command": "extension.target.run",
"key": "Ctrl+Shift+T",
"mac": "Ctrl+Shift+T"
},
{
"command": "extension.target.run",
"key": "F9",
"mac": "F9"
},
{
"command": "extension.target.build",
"key": "F7",
"mac": "F7"
},
{
"command": "workbench.action.tasks.runTask",
"key": "Ctrl+Shift+R",
"mac": "Ctrl+Shift+R"
}
]
},
"scripts": {
"vscode:prepublish": "npm-run-all --parallel \"esbuild-base -- --minify\" \"esbuild-server -- --minify\"",
"esbuild-base": "esbuild ./client/src/extension.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node",
"esbuild-server": "esbuild ./server/src/server.ts --bundle --outfile=out/server.js --external:vscode --format=cjs --platform=node",
"compile-for-tests": "tsc -b -w",
"esbuild": "npm-run-all --parallel \"esbuild-base -- --sourcemap\" \"esbuild-server -- --sourcemap\"",
"esbuild-watch": "npm-run-all --parallel \"esbuild-base -- --sourcemap --watch\" \"esbuild-server -- --sourcemap --watch\" \"compile-for-tests\"",
"lint": "eslint ./client/src ./server/src --ext .ts,.tsx",
"postinstall": "cd client && npm install && cd ../server && npm install && cd ..",
"package": "vsce package"
},
"devDependencies": {
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.5",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vscode/vsce": "^2.23.0",
"esbuild": "^0.19.11",
"eslint": "^8.56.0",
"mocha": "^10.2.0",
"npm-run-all": "^4.1.5",
"typescript": "^5.3.3"
},
"dependencies": {
"source-map-support": "^0.5.21"
}
}