Skip to content

Add embedded editor tests #19187

Add embedded editor tests

Add embedded editor tests #19187

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# If you change this name, don't forget to change deploy-to-alpha.yml
name: Unit tests
on:
push:
pull_request:
workflow_dispatch: {} # Allow running the workflow on-demand
jobs:
# This identifier gets used in .mergify.yml
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'
- name: Set up NodeJS 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
- name: Install Nodejs dependencies
run: |
npm ci
# we already run this in build-tools/github/validate-tests
#- name: Generate grammar files
# run: |
# python ./content/yaml_to_lark_utils.py
- name: Compiling Babel translations
run: |
pybabel compile -f -d translations
- name: Calculate hedy cache key
run: "echo value=$(ls -1 hedy.py grammars/* | sort | xargs tail -n 99999999 | sha256sum | cut -f 1 -d ' ') >> $GITHUB_OUTPUT"
id: hedy_cache_key
- name: Cache hedy test runs
uses: actions/cache@v3
with:
path: .test-cache
key: "hedy-test-cache-${{ steps.hedy_cache_key.outputs.value }}"
- name: Run weblate tests
shell: pwsh
id: weblate_tests
if: ${{ github.event.pull_request.user.login == 'weblate' }}
run: |
build-tools/github/validate --weblate
- name: Run all tests
shell: pwsh
if: ${{ ((github.event.pull_request.user.login != 'weblate') || github.event.label.name == 'force_tests') }}
run: |
build-tools/github/validate --all