Negates run_tests

This commit is contained in:
Spoffy 2024-07-02 19:20:20 +01:00
parent ef37409aac
commit 7aff4d4a81

View File

@ -16,11 +16,11 @@ on:
type: string type: string
required: true required: true
default: latest_candidate default: latest_candidate
run_tests: disable_tests:
description: "Should the tests be run before building the image?" description: "Should the tests be skipped?"
type: boolean type: boolean
required: True required: True
default: True default: False
platforms: platforms:
description: "Platforms to build" description: "Platforms to build"
type: choice type: choice
@ -58,7 +58,7 @@ jobs:
repo: "grist-ee" repo: "grist-ee"
steps: steps:
- name: Check out the repo - name: Check out the repo
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
ref: ${{ inputs.latest_branch }} ref: ${{ inputs.latest_branch }}
@ -83,40 +83,39 @@ jobs:
build-contexts: ${{ matrix.image.name != 'grist-oss' && 'ext=ext' || '' }} build-contexts: ${{ matrix.image.name != 'grist-oss' && 'ext=ext' || '' }}
- name: Use Node.js ${{ matrix.node-version }} for testing - name: Use Node.js ${{ matrix.node-version }} for testing
if: ${{ inputs.run_tests || inputs.run_tests == null }} if: ${{ !inputs.disable_tests }}
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }} for testing - maybe not needed - name: Set up Python ${{ matrix.python-version }} for testing - maybe not needed
if: ${{ inputs.run_tests || inputs.run_tests == null }} if: ${{ !inputs.disable_tests }}
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install Python packages - name: Install Python packages
if: ${{ inputs.run_tests || inputs.run_tests == null }} if: ${{ !inputs.disable_tests }}
run: | run: |
pip install virtualenv pip install virtualenv
yarn run install:python yarn run install:python
- name: Install Node.js packages - name: Install Node.js packages
if: ${{ inputs.run_tests || inputs.run_tests == null }} if: ${{ !inputs.disable_tests }}
run: yarn install run: yarn install
- name: Build Node.js code - name: Build Node.js code
if: ${{ inputs.run_tests || inputs.run_tests == null }} if: ${{ !inputs.disable_tests }}
run: | run: |
rm -rf ext rm -rf ext
yarn run build:prod yarn run build:prod
- name: Run tests - name: Run tests
if: ${{ inputs.run_tests || inputs.run_tests == null }} if: ${{ !inputs.disable_tests }}
run: TEST_IMAGE=${{ env.DOCKER_HUB_OWNER }}/${{ matrix.image.name }}:${{ env.TAG }} VERBOSE=1 DEBUG=1 MOCHA_WEBDRIVER_HEADLESS=1 yarn run test:docker run: TEST_IMAGE=${{ env.DOCKER_HUB_OWNER }}/${{ matrix.image.name }}:${{ env.TAG }} VERBOSE=1 DEBUG=1 MOCHA_WEBDRIVER_HEADLESS=1 yarn run test:docker
- name: Restore the ext/ directory - name: Restore the ext/ directory
if: ${{ matrix.image.name != 'grist-oss' && (inputs.run_tests || inputs.run_tests == null) }} if: ${{ matrix.image.name != 'grist-oss' && !inputs.disable_tests }}
run: buildtools/checkout-ext-directory.sh ${{ matrix.image.repo }} run: buildtools/checkout-ext-directory.sh ${{ matrix.image.repo }}
- name: Log in to Docker Hub - name: Log in to Docker Hub