mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-06-07 18:35:01 -04:00
ci: run with python 3
This commit is contained in:
parent
6557bf4a2b
commit
c1451fd071
5 changed files with 1761 additions and 1470 deletions
60
.github/workflows/deploy.yml
vendored
60
.github/workflows/deploy.yml
vendored
|
@ -10,15 +10,15 @@ jobs:
|
||||||
JVM_OPTS: -Xmx3200m
|
JVM_OPTS: -Xmx3200m
|
||||||
DETECT_CHROMEDRIVER_VERSION: "true"
|
DETECT_CHROMEDRIVER_VERSION: "true"
|
||||||
PROJECT_PATH: ./scratch-blocks
|
PROJECT_PATH: ./scratch-blocks
|
||||||
container:
|
# container:
|
||||||
image: python:2.7.18-buster
|
# image: python:2.7.18-buster
|
||||||
options: --user root
|
# options: --user root
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install Chrome Dependencies
|
- name: Install Chrome Dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
sudo apt-get update
|
||||||
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
|
sudo 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
|
||||||
- name: Check Python version
|
- name: Check Python version
|
||||||
run: python --version
|
run: python --version
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
|
@ -30,17 +30,49 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
# - name: Setup Chrome
|
- uses: browser-actions/setup-chrome@v1
|
||||||
# uses: browser-actions/setup-chrome@v1
|
with:
|
||||||
# with:
|
chrome-version: stable
|
||||||
# chrome-version: latest
|
id: setup-chrome
|
||||||
|
- run: |
|
||||||
|
echo Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }}
|
||||||
|
${{ steps.setup-chrome.outputs.chrome-path }} --version
|
||||||
|
- name: Install Chrome Driver
|
||||||
|
run: DETECT_CHROMEDRIVER_VERSION=true npm install chromedriver
|
||||||
- name: Install Node Dependencies
|
- name: Install Node Dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: npm run test:lint
|
run: npm run test:lint
|
||||||
- name: Whats In Here
|
|
||||||
run: ls -la
|
|
||||||
- name: MSG
|
|
||||||
run: cd msg && ls -la
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: npm test
|
run: npm run test:messages
|
||||||
|
- name: Run Unit Tests
|
||||||
|
run: DISPLAY=:99 npm run test:unit
|
||||||
|
- name: Remove Closure App
|
||||||
|
run: rm -rf gh-pages/closure-library/scripts/ci/CloseAdobeDialog.exe
|
||||||
|
- name: Deploy playground to GitHub Pages
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./gh-pages
|
||||||
|
full_commit_message: "Build for ${{ github.sha }} ${{ github.event.head_commit.message }}"
|
||||||
|
enable_jekyll: true
|
||||||
|
- name: Deploy to npm
|
||||||
|
run: |
|
||||||
|
export RELEASE_VERSION="0.2.0-prerelease.$(date +'%Y%m%d%H%M%S')"
|
||||||
|
if [[ "${{contains(github.ref, 'hotfix')}} ]]; then
|
||||||
|
export NPM_TAG=hotfix
|
||||||
|
elif [[ "${{contains(github.ref, 'beta')}} ]]; then
|
||||||
|
export NPM_TAG=beta
|
||||||
|
else
|
||||||
|
export NPM_TAG=latest
|
||||||
|
fi
|
||||||
|
echo "Deploying version $RELEASE_VERSION to $NPM_TAG"
|
||||||
|
npm --no-git-tag-version version $RELEASE_VERSION
|
||||||
|
npm set //registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}
|
||||||
|
npm publish --tag $NPM_TAG
|
||||||
|
if npm info | grep -q $RELEASE_VERSION; then
|
||||||
|
git tag $RELEASE_VERSION
|
||||||
|
git push \
|
||||||
|
https://${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git \
|
||||||
|
$RELEASE_VERSION
|
||||||
|
fi
|
||||||
|
|
2
.nvmrc
2
.nvmrc
|
@ -1 +1 @@
|
||||||
v16
|
v18
|
||||||
|
|
3165
package-lock.json
generated
3165
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -25,6 +25,7 @@
|
||||||
"translate:update": "npm run translate:sync:src && npm run translate:sync:translations"
|
"translate:update": "npm run translate:sync:src && npm run translate:sync:translations"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"chromedriver": "^118.0.1",
|
||||||
"exports-loader": "0.7.0",
|
"exports-loader": "0.7.0",
|
||||||
"google-closure-library": "20190301.0.0",
|
"google-closure-library": "20190301.0.0",
|
||||||
"imports-loader": "0.8.0",
|
"imports-loader": "0.8.0",
|
||||||
|
@ -32,7 +33,6 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"async": "2.6.4",
|
"async": "2.6.4",
|
||||||
"chromedriver": "115.0.1",
|
|
||||||
"copy-webpack-plugin": "4.6.0",
|
"copy-webpack-plugin": "4.6.0",
|
||||||
"eslint": "4.19.1",
|
"eslint": "4.19.1",
|
||||||
"event-stream": "3.3.5",
|
"event-stream": "3.3.5",
|
||||||
|
|
|
@ -55,7 +55,7 @@ module.exports = [{
|
||||||
entry: './shim/gh-pages.js',
|
entry: './shim/gh-pages.js',
|
||||||
output: {
|
output: {
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
path: path.resolve(__dirname, 'github-pages') //'/__w/scratch-blocks/scratch-blocks/github-pages'
|
path: path.resolve(__dirname, 'gh-pages')
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: false
|
minimize: false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue