Skip to content

Commit 447cac1

Browse files
author
Ron de las Alas
committed
ci: install node dependencies
1 parent fc13557 commit 447cac1

File tree

5 files changed

+41
-144
lines changed

5 files changed

+41
-144
lines changed

.circleci/config.yml

-137
This file was deleted.

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
/gh-pages/*
1515
/webpack.config.js
1616
/build/*
17+
18+
/github-pages/*

.github/workflows/deploy.yml

+34-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,46 @@
11
name: build-scratch-blocks
22
on:
33
push:
4+
permissions: write-all
5+
46
jobs:
57
setup:
6-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-latest
9+
env:
10+
JVM_OPTS: -Xmx3200m
11+
DETECT_CHROMEDRIVER_VERSION: "true"
12+
PROJECT_PATH: ./scratch-blocks
713
container:
814
image: python:2.7.18-buster
15+
options: --user root
916
steps:
1017
- uses: actions/checkout@v3
18+
- name: Install Chrome Dependencies
19+
run: |
20+
apt-get update
21+
apt-get install -y libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libgbm-dev libnss3-dev libxss-dev libasound2
22+
- name: Check Python version
23+
run: python --version
24+
- name: Setup Java
25+
uses: actions/setup-java@v3
26+
with:
27+
distribution: 'temurin'
28+
java-version: 17
1129
- name: Setup Node
12-
uses: actions/setup-node@v2
30+
uses: actions/setup-node@v3
1331
with:
14-
node-version: 16
32+
node-version-file: '.nvmrc'
33+
# - name: Setup Chrome
34+
# uses: browser-actions/setup-chrome@v1
35+
# with:
36+
# chrome-version: latest
1537
- name: Install Node Dependencies
16-
run: node -v
38+
run: npm ci
39+
- name: Lint
40+
run: npm run test:lint
41+
- name: Whats In Here
42+
run: ls -la
43+
- name: MSG
44+
run: cd msg && ls -la
45+
- name: Run Tests
46+
run: npm test

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"test:unit": "node tests/jsunit/test_runner.js",
1818
"test:lint": "eslint .",
1919
"test:messages": "npm run translate && node i18n/test_scratch_msgs.js",
20-
"test": "npm run test:lint && npm run test:messages && npm run test:unit",
20+
"test": "npm run test:messages && npm run test:unit",
2121
"version": "json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\"",
2222
"translate": "node i18n/js_to_json.js && node i18n/json_to_js.js",
2323
"translate:sync:src": "tx-push-src scratch-editor blocks msg/json/en.json",
@@ -48,4 +48,4 @@
4848
"webpack": "4.47.0",
4949
"webpack-cli": "3.3.12"
5050
}
51-
}
51+
}

webpack.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ var CopyWebpackPlugin = require('copy-webpack-plugin');
77
var path = require('path');
88
var UglifyJsPlugin = require('uglifyjs-webpack-plugin');
99

10+
11+
1012
module.exports = [{
1113
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
1214
entry: {
@@ -53,7 +55,7 @@ module.exports = [{
5355
entry: './shim/gh-pages.js',
5456
output: {
5557
filename: '[name].js',
56-
path: path.resolve(__dirname, 'gh-pages')
58+
path: path.resolve(__dirname, 'github-pages') //'/__w/scratch-blocks/scratch-blocks/github-pages'
5759
},
5860
optimization: {
5961
minimize: false

0 commit comments

Comments
 (0)