Skip to content

API test server to run unit tests, acceptance tests for codeceptjs with Docker Compose support and reliable data reloading #4065

API test server to run unit tests, acceptance tests for codeceptjs with Docker Compose support and reliable data reloading

API test server to run unit tests, acceptance tests for codeceptjs with Docker Compose support and reliable data reloading #4065

Workflow file for this run

name: TestCafe Tests
on:
push:
branches:
- 3.x
pull_request:
branches:
- '**'
env:
CI: true
# Force terminal colors. @see https://www.npmjs.com/package/colors
FORCE_COLOR: 1
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04]
php-version: ['8.1']
node-version: [22.x]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: npm install
run: |
npm i --force
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- name: start a server
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
start /B php -S 127.0.0.1:8000 -t test/data/app
else
php -S 127.0.0.1:8000 -t test/data/app &
fi
sleep 3
shell: bash
- name: run unit tests
run: npm run test:unit:webbapi:testCafe