|
| 1 | +name: Robot Tests (Coredev) |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + approved: |
| 7 | + description: 'Finished review? Run coredev robottests.' |
| 8 | + required: true |
| 9 | + type: boolean |
| 10 | + |
| 11 | +jobs: |
| 12 | + robot-tests: |
| 13 | + name: Coredev robot tests |
| 14 | + runs-on: ubuntu-latest |
| 15 | + env: |
| 16 | + PYTHONWARNINGS: ignore |
| 17 | + GIT_CLONE_DEPTH: 1 |
| 18 | + zope_i18n_compile_mo_files: 'true' |
| 19 | + ROBOTSUITE_LOGLEVEL: ERROR |
| 20 | + ROBOTSUITE_PREFIX: ONLYROBOT |
| 21 | + NODE_OPTIONS: "--max_old_space_size=8192" |
| 22 | + |
| 23 | + steps: |
| 24 | + - name: locale |
| 25 | + # needed for CMFPlone testUnicodeSplitter test on Ubuntu |
| 26 | + run: | |
| 27 | + sudo locale-gen nl_NL@euro |
| 28 | + sudo update-locale |
| 29 | +
|
| 30 | + # ── 1. Checkout repositories ───────────────────────────────────────────── |
| 31 | + - name: Checkout mockup |
| 32 | + uses: actions/checkout@v4 |
| 33 | + |
| 34 | + - name: Checkout buildout.coredev |
| 35 | + uses: actions/checkout@v4 |
| 36 | + with: |
| 37 | + repository: plone/buildout.coredev |
| 38 | + path: tests |
| 39 | + |
| 40 | + # ── 2. Node.js setup ────────────────────────────────────────────────────── |
| 41 | + - name: Set up Node.js |
| 42 | + uses: actions/setup-node@v4 |
| 43 | + with: |
| 44 | + node-version: "22" |
| 45 | + cache: yarn |
| 46 | + |
| 47 | + - name: Install yarn dependencies |
| 48 | + run: yarn install |
| 49 | + |
| 50 | + # ── 3. Python / make install ───────────────────────────────────────────── |
| 51 | + - name: Set up Python 3.12 |
| 52 | + uses: actions/setup-python@v5 |
| 53 | + with: |
| 54 | + python-version: "3.12" |
| 55 | + cache: pip |
| 56 | + cache-dependency-path: tests/requirements.txt |
| 57 | + |
| 58 | + - name: Mark plone.staticresources as source checkout for mxdev |
| 59 | + working-directory: tests |
| 60 | + run: | |
| 61 | + python3 -c " |
| 62 | + import configparser |
| 63 | + cfg = configparser.ConfigParser() |
| 64 | + cfg.read('mxcheckouts.ini') |
| 65 | + if not cfg.has_section('plone.staticresources'): |
| 66 | + cfg.add_section('plone.staticresources') |
| 67 | + cfg.set('plone.staticresources', 'use', 'true') |
| 68 | + with open('mxcheckouts.ini', 'w') as f: |
| 69 | + cfg.write(f) |
| 70 | + " |
| 71 | +
|
| 72 | + - name: make install (checks out plone.staticresources via mxdev) |
| 73 | + working-directory: tests |
| 74 | + run: make install |
| 75 | + |
| 76 | + # ── 2b. Build mockup bundle into tests/src/plone.staticresources ───────── |
| 77 | + - name: Build mockup for tests (webpack) |
| 78 | + run: yarn build:webpack:tests |
| 79 | + |
| 80 | + # ── 4. Install Playwright / rfbrowser ──────────────────────────────────── |
| 81 | + - name: make rfbrowser |
| 82 | + working-directory: tests |
| 83 | + run: make rfbrowser |
| 84 | + |
| 85 | + # ── 5. Coredev robot tests ─────────────────────────────────────────────── |
| 86 | + - name: Run Coredev robot tests |
| 87 | + working-directory: tests |
| 88 | + run: TEST_ARGS="--all -t ONLYROBOT" make test |
| 89 | + |
| 90 | + - name: Upload robot test results |
| 91 | + if: always() |
| 92 | + uses: actions/upload-artifact@v4 |
| 93 | + with: |
| 94 | + name: robot-results |
| 95 | + path: tests/parts/tests/ |
| 96 | + if-no-files-found: ignore |
0 commit comments