scratch-gui 4.0.14 → 4.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci-cd.yml +17 -143
- package/CHANGELOG.md +7 -0
- package/pack/{scratch-gui-4.0.14.tgz → scratch-gui-4.0.15.tgz} +0 -0
- package/package.json +1 -1
- package/static/microbit/scratch-microbit-1.2.0.hex +26350 -0
- package/test-results/integration/results.txt +250 -0
- package/test-results/unit/unit-results.xml +671 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
name: CI/CD
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
push:
|
|
4
|
+
pull_request: # Runs whenever a pull request is created or updated (including from another fork)
|
|
5
|
+
push: # Runs whenever a commit is pushed to the repository...
|
|
6
|
+
branches: [master, develop, hotfix/*] # ...on any of these branches
|
|
7
|
+
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
|
|
6
8
|
concurrency:
|
|
7
9
|
group: "${{ github.workflow }} @ ${{ github.head_ref || github.ref }}"
|
|
8
10
|
cancel-in-progress: true
|
|
@@ -14,7 +16,7 @@ permissions:
|
|
|
14
16
|
pull-requests: write # comment on released pull requests
|
|
15
17
|
|
|
16
18
|
jobs:
|
|
17
|
-
|
|
19
|
+
ci-cd:
|
|
18
20
|
runs-on: ubuntu-latest
|
|
19
21
|
env:
|
|
20
22
|
DETECT_CHROMEDRIVER_VERSION: "true"
|
|
@@ -38,93 +40,16 @@ jobs:
|
|
|
38
40
|
run: npm ci
|
|
39
41
|
- name: Lint
|
|
40
42
|
run: npm run test:lint
|
|
41
|
-
- name: Cache node_modules
|
|
42
|
-
id: cache-nodemodules
|
|
43
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
44
|
-
with:
|
|
45
|
-
path:
|
|
46
|
-
node_modules
|
|
47
|
-
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
|
48
|
-
- name: Cache src/generated
|
|
49
|
-
id: cache-generated
|
|
50
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
51
|
-
with:
|
|
52
|
-
path:
|
|
53
|
-
src/generated
|
|
54
|
-
key: ${{ runner.os }}-generated-${{ hashFiles('package-lock.json') }}
|
|
55
|
-
- name: Cache static/microbit
|
|
56
|
-
id: cache-static
|
|
57
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
58
|
-
with:
|
|
59
|
-
path:
|
|
60
|
-
static/microbit
|
|
61
|
-
key: ${{ runner.os }}-microbit-${{ hashFiles('package-lock.json') }}
|
|
62
|
-
test-unit:
|
|
63
|
-
needs: setup
|
|
64
|
-
runs-on: ubuntu-latest
|
|
65
|
-
env:
|
|
66
|
-
JEST_JUNIT_OUTPUT_NAME: unit-results.xml
|
|
67
|
-
JEST_JUNIT_OUTPUT_DIR: test-results/unit
|
|
68
|
-
steps:
|
|
69
|
-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
70
|
-
- name: Cache NPM dependencies
|
|
71
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
72
|
-
with:
|
|
73
|
-
path:
|
|
74
|
-
node_modules
|
|
75
|
-
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
|
76
43
|
- name: Run Unit Tests
|
|
44
|
+
env:
|
|
45
|
+
JEST_JUNIT_OUTPUT_NAME: unit-results.xml
|
|
46
|
+
JEST_JUNIT_OUTPUT_DIR: test-results/unit
|
|
77
47
|
run: npm run test:unit -- --reporters="default" --reporters="jest-junit" --coverage --coverageReporters=text --coverageReporters=lcov --maxWorkers="2"
|
|
78
|
-
- name: Store Unit Test Results
|
|
79
|
-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
|
|
80
|
-
with:
|
|
81
|
-
name: unit-test-output
|
|
82
|
-
path: ./test-results/*
|
|
83
|
-
build:
|
|
84
|
-
needs: [setup, test-unit]
|
|
85
|
-
env:
|
|
86
|
-
NODE_OPTIONS: --max-old-space-size=4000
|
|
87
|
-
runs-on: ubuntu-latest
|
|
88
|
-
steps:
|
|
89
|
-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
90
|
-
- uses: actions/setup-node@26961cf329f22f6837d5f54c3efd76b480300ace # v4
|
|
91
|
-
with:
|
|
92
|
-
cache: "npm"
|
|
93
|
-
node-version-file: ".nvmrc"
|
|
94
|
-
- name: Retrieve node_modules
|
|
95
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
96
|
-
with:
|
|
97
|
-
path:
|
|
98
|
-
node_modules
|
|
99
|
-
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
|
100
|
-
- name: Retrieve src/generated
|
|
101
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
102
|
-
with:
|
|
103
|
-
path:
|
|
104
|
-
src/generated
|
|
105
|
-
key: ${{ runner.os }}-generated-${{ hashFiles('package-lock.json') }}
|
|
106
|
-
- name: Retireve static/microbit
|
|
107
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
108
|
-
with:
|
|
109
|
-
path:
|
|
110
|
-
static/microbit
|
|
111
|
-
key: ${{ runner.os }}-microbit-${{ hashFiles('package-lock.json') }}
|
|
112
48
|
- name: Run Build
|
|
113
49
|
env:
|
|
50
|
+
NODE_OPTIONS: --max-old-space-size=4000
|
|
114
51
|
NODE_ENV: production
|
|
115
52
|
run: npm run build
|
|
116
|
-
- name: Cache Build Directory
|
|
117
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
118
|
-
with:
|
|
119
|
-
path:
|
|
120
|
-
./build
|
|
121
|
-
key: ${{ runner.os }}-build-${{ hashFiles('package-lock.json') }}
|
|
122
|
-
- name: Cache Dist Directory
|
|
123
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
124
|
-
with:
|
|
125
|
-
path:
|
|
126
|
-
./dist
|
|
127
|
-
key: ${{ runner.os }}-dist-${{ hashFiles('package-lock.json') }}
|
|
128
53
|
- name: Store Build Output
|
|
129
54
|
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
|
|
130
55
|
with:
|
|
@@ -135,55 +60,21 @@ jobs:
|
|
|
135
60
|
with:
|
|
136
61
|
name: dist-output
|
|
137
62
|
path: ./dist
|
|
138
|
-
test-integration:
|
|
139
|
-
needs: build
|
|
140
|
-
runs-on: ubuntu-latest
|
|
141
|
-
env:
|
|
142
|
-
JEST_JUNIT_OUTPUT_NAME: results.txt
|
|
143
|
-
JEST_JUNIT_OUTPUT_DIR: test-results/integration
|
|
144
|
-
steps:
|
|
145
|
-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
146
|
-
- name: Retrieve npm dependencies
|
|
147
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
148
|
-
with:
|
|
149
|
-
path:
|
|
150
|
-
node_modules
|
|
151
|
-
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
|
152
|
-
- name: Retrieve Build
|
|
153
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
154
|
-
with:
|
|
155
|
-
path:
|
|
156
|
-
./build
|
|
157
|
-
key: ${{ runner.os }}-build-${{ hashFiles('package-lock.json') }}
|
|
158
63
|
- run: |
|
|
159
64
|
for F in chrome chromium chromedriver; do
|
|
160
65
|
which $F && $F --version || echo Not found: $F
|
|
161
66
|
done
|
|
162
67
|
- name: Run Integration Tests
|
|
68
|
+
env:
|
|
69
|
+
JEST_JUNIT_OUTPUT_NAME: results.txt
|
|
70
|
+
JEST_JUNIT_OUTPUT_DIR: test-results/integration
|
|
163
71
|
run: npm run test:integration -- --reporters="default" --reporters="jest-junit"
|
|
164
|
-
- name: Store
|
|
72
|
+
- name: Store Test Results
|
|
73
|
+
if: always() # Even if tests fail
|
|
165
74
|
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
|
|
166
75
|
with:
|
|
167
|
-
name:
|
|
168
|
-
path: ./test-results/*
|
|
169
|
-
deploy-npm:
|
|
170
|
-
needs: [test-integration, test-unit]
|
|
171
|
-
if: (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/develop') || (github.ref == 'refs/heads/beta') || startsWith(github.ref, 'refs/heads/hotfix')
|
|
172
|
-
runs-on: ubuntu-latest
|
|
173
|
-
steps:
|
|
174
|
-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
175
|
-
- name: Retrieve npm dependencies
|
|
176
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
177
|
-
with:
|
|
178
|
-
path:
|
|
179
|
-
node_modules
|
|
180
|
-
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
|
181
|
-
- name: Retrieve Dist Directory
|
|
182
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
183
|
-
with:
|
|
184
|
-
path:
|
|
185
|
-
./dist
|
|
186
|
-
key: ${{ runner.os }}-dist-${{ hashFiles('package-lock.json') }}
|
|
76
|
+
name: test-output
|
|
77
|
+
path: ./test-results/* # Both unit and integration test results
|
|
187
78
|
- run: |
|
|
188
79
|
if [[ ${{contains(github.ref, 'hotfix')}} ]]; then
|
|
189
80
|
sed -e "s|hotfix/REPLACE|${{ github.ref_name }}|" --in-place release.config.js
|
|
@@ -193,26 +84,9 @@ jobs:
|
|
|
193
84
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
194
85
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
195
86
|
run: npx --no -- semantic-release
|
|
196
|
-
deploy-gh-pages:
|
|
197
|
-
needs: [test-integration, test-unit]
|
|
198
|
-
if: (!(startsWith(github.ref, 'refs/heads/dependabot/') || startsWith(github.ref, 'refs/heads/renovate/')))
|
|
199
|
-
runs-on: ubuntu-latest
|
|
200
|
-
steps:
|
|
201
|
-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
202
|
-
- name: Retrieve npm dependencies
|
|
203
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
204
|
-
with:
|
|
205
|
-
path:
|
|
206
|
-
node_modules
|
|
207
|
-
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
|
208
|
-
- name: Retrieve Build Directory
|
|
209
|
-
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
|
210
|
-
with:
|
|
211
|
-
path:
|
|
212
|
-
./build
|
|
213
|
-
key: ${{ runner.os }}-build-${{ hashFiles('package-lock.json') }}
|
|
214
87
|
- name: Deploy playground to GitHub Pages
|
|
215
88
|
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3
|
|
89
|
+
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
|
|
216
90
|
with:
|
|
217
91
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
218
92
|
publish_dir: ./build
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.0.15](https://github.com/scratchfoundation/scratch-gui/compare/v4.0.14...v4.0.15) (2024-08-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **deps:** lock file maintenance ([c518b32](https://github.com/scratchfoundation/scratch-gui/commit/c518b32de59f3afa29712c32d7192c8cb7698d0d))
|
|
12
|
+
|
|
6
13
|
## [4.0.14](https://github.com/scratchfoundation/scratch-gui/compare/v4.0.13...v4.0.14) (2024-08-28)
|
|
7
14
|
|
|
8
15
|
|
|
Binary file
|
package/package.json
CHANGED