Skip to content

LIMS-2007: Remove dev server dependencies (#1010) #1357

LIMS-2007: Remove dev server dependencies (#1010)

LIMS-2007: Remove dev server dependencies (#1010) #1357

Workflow file for this run

name: Build and Test SynchWeb
on:
push:
branches:
- 'master'
- 'prerelease'
- 'release/**'
- 'pre-release/**'
pull_request:
branches:
- 'master'
- 'prerelease'
- 'release/**'
- 'pre-release/**'
defaults:
run:
shell: bash
working-directory: ./api
jobs:
php-build:
name: Checkout, build, test and lint PHP code
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP 7.3
uses: shivammathur/setup-php@v2
with:
php-version: 7.3
tools: psalm:4
# Added extensions and coverage here so they are ready for the native run
extensions: mysqli, zip, xdebug
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
# CHANGED: Replaced php-actions/phpunit with native execution
# This runs the PHPUnit located in your vendor folder, avoiding the PHAR crash
- name: PHPUnit Tests
run: vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-text
env:
XDEBUG_MODE: coverage
- name: Run Psalm
run: psalm --output-format=github
js_build:
name: JavaScript build, test and lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: JavaScript build, lint and test
working-directory: ./client
# hack the output from the linting steps to avoid these stopping the builds
run: |
cp src/js/config_sample.json src/js/config.json
node --version
npm ci
npm run build
npm run test
npm run lint || exit 0
npm run lint-vue || exit 0