Skip to content

重构 Tokens 计算到 Client #147

重构 Tokens 计算到 Client

重构 Tokens 计算到 Client #147

Workflow file for this run

name: Server test
on:
push:
paths:
- "server/**"
pull_request:
jobs:
php-cs-fixer:
if: github.repository == 'imiphp/imi-ai'
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
swoole: ["5.0-php8.1", "5.0-php8.2"]
env:
SWOOLE_DOCKER_VERSION: ${{ matrix.swoole }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: |
docker build --build-arg SWOOLE_DOCKER_VERSION=$SWOOLE_DOCKER_VERSION -f .github/swoole.dockerfile -t swoole .
docker run --name swoole --volume=${GITHUB_WORKSPACE}/server:/app:rw --workdir=/app -d swoole
docker exec swoole php -v
docker exec swoole php -m
docker exec swoole php --ri swoole
docker exec swoole composer -V
docker exec swoole composer update --no-interaction --prefer-dist --no-progress
- name: Test
run: docker exec swoole composer check-format
phpstan:
if: github.repository == 'imiphp/imi-ai'
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
swoole: ["5.0-php8.1", "5.0-php8.2"]
env:
SWOOLE_DOCKER_VERSION: ${{ matrix.swoole }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: |
docker build --build-arg SWOOLE_DOCKER_VERSION=$SWOOLE_DOCKER_VERSION -f .github/swoole.dockerfile -t swoole .
docker run --name swoole --volume=${GITHUB_WORKSPACE}/server:/app:rw --workdir=/app -d swoole
docker exec swoole php -v
docker exec swoole php -m
docker exec swoole php --ri swoole
docker exec swoole composer -V
docker exec swoole composer update --no-interaction --prefer-dist --no-progress
- name: Test
run: docker exec swoole composer phpstan