Skip to content

Commit

Permalink
build: added Jest tests in build
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed May 30, 2024
1 parent 78a8105 commit 8b5a733
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 1,896 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build-php.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,23 @@ jobs:
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
- name: Install PHP dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Lint with PHPCS
run: phpmyfaq/src/libs/bin/phpcs --standard=PSR12 ./phpmyfaq/src/phpMyFAQ
run: phpmyfaq/src/libs/bin/phpcs --standard=PSR12 ./phpmyfaq/src/phpMyFAQ

- name: Test with PHPUnit
run: phpmyfaq/src/libs/bin/phpunit --coverage-text

- name: Setup Node.js with pnpm
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install Node.js dependencies
run: pnpm install

- name: Run Jest tests
run: pnpm test
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,12 @@ You can read the complete documentation on [here](https://phpmyfaq.readthedocs.i

## REST API v3.0 documentation

The REST API documentation is available as OpenAPI 3.0 specification [here](docs/openapi.yaml).
The REST API documentation is available as OpenAPI 3.0 specification:

- [JSON](docs/openapi.json)
- [YAML](docs/openapi.yaml)

The Swagger UI is available at [https://api-docs.phpmyfaq.de/](https://api-docs.phpmyfaq.de/).

## License

Expand Down
Loading

0 comments on commit 8b5a733

Please sign in to comment.