Skip to content

Merge pull request #308 from ckeditor/update-license-header #264

Merge pull request #308 from ckeditor/update-license-header

Merge pull request #308 from ckeditor/update-license-header #264

Workflow file for this run

name: Test all
on:
pull_request:
branches:
- master
- stable
- major
push:
tags:
- v*
branches:
- master
- stable
- major
jobs:
# Runs unit tests for all configured React version
test-units:
runs-on: ubuntu-20.04
name: Run unit tests
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Setup Chrome
uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
# Set variables required for further steps.
# CHROME_BIN is required by Karma.
# REACT_VERSION is set to "current" for pull request events and "all" for other events.
- name: Set test variables
run: |
export CHROME_BIN=$(which chrome);
if [ -z ${GITHUB_HEAD_REF} ]; then echo "REACT_VERSION=all"; else echo "REACT_VERSION=current"; fi >> $GITHUB_ENV;
- name: Install dependencies
run: npm install
# Run tests with the help of Xvfb, since there is no screen output available (required for locally installed browsers).
- name: Run tests
uses: GabrielBB/xvfb-action@v1
env:
CKEDITOR_LICENSE_KEY: ${{ secrets.CKEDITOR_LICENSE_KEY }}
with:
run: npm run test:units -- react ${{ env.REACT_VERSION }}