2021-04-12 19:25:34 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
# Allows running this workflow manually from the Actions tab
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-09-06 15:46:52 +00:00
|
|
|
python-version: [3.9]
|
2022-03-28 19:43:47 +00:00
|
|
|
node-version: [14.x]
|
2021-04-12 19:25:34 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
|
|
- name: Install Python packages
|
|
|
|
run: |
|
|
|
|
pip install virtualenv
|
|
|
|
yarn run install:python
|
|
|
|
|
|
|
|
- name: Install Node.js packages
|
|
|
|
run: yarn install
|
|
|
|
|
|
|
|
- name: Build Node.js code
|
|
|
|
run: yarn run build:prod
|
|
|
|
|
2021-12-13 18:35:00 +00:00
|
|
|
- name: Run smoke test
|
2022-08-10 12:16:27 +00:00
|
|
|
run: VERBOSE=1 DEBUG=1 MOCHA_WEBDRIVER_HEADLESS=1 yarn run test:smoke
|
2021-12-13 18:35:00 +00:00
|
|
|
|
|
|
|
- name: Run main tests
|
2022-08-10 12:16:27 +00:00
|
|
|
run: MOCHA_WEBDRIVER_HEADLESS=1 yarn run test
|
2021-11-24 18:45:21 +00:00
|
|
|
|
|
|
|
- name: Update candidate branch
|
|
|
|
if: ${{ github.event_name == 'push' }}
|
|
|
|
uses: ad-m/github-push-action@8407731efefc0d8f72af254c74276b7a90be36e1
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: latest_candidate
|
|
|
|
force: true
|