mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
49 lines
1.9 KiB
YAML
49 lines
1.9 KiB
YAML
name: build-scratch-blocks
|
|
on:
|
|
push: # Runs whenever a commit is pushed to the repository
|
|
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
|
|
jobs:
|
|
setup:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
JVM_OPTS: -Xmx3200m
|
|
PROJECT_PATH: ./scratch-blocks
|
|
steps:
|
|
- run: |
|
|
for F in chrome chromium chromedriver; do
|
|
which $F && $F --version || echo Not found: $F
|
|
done
|
|
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
|
- name: Check Python version
|
|
run: python --version
|
|
- name: Setup Java
|
|
uses: actions/setup-java@dda1638bc011456727caa31df8804f3862d862c8 # v3
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: 17
|
|
- name: Setup Node
|
|
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
- name: Install Node Dependencies
|
|
run: npm ci
|
|
- name: Lint
|
|
run: npm run test:lint
|
|
- name: Run Tests
|
|
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@373f7f263a76c20808c831209c920827a82a2847 # 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: Run semantic-release
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: npx --no -- semantic-release
|