Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Add PHP api docs #1197 #1204

Merged
merged 15 commits into from
Aug 11, 2024
39 changes: 24 additions & 15 deletions .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
@@ -29,10 +29,14 @@ jobs:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo clippy ${{ env.RUST_PROJECTS }} --all-targets --all-features -- -D warnings
- run: |
cd examples/server_client_typescript
npm ci
npm run lint:check
- run: npm ci
working-directory: examples/server_client_typescript
- run: npm run lint:check
working-directory: examples/server_client_typescript
- run: composer install && vendor/bin/phpstan analyse --level=9 -v src
working-directory: examples/server_client_php
- run: vendor/bin/phpstan analyse --level=9 -v src
working-directory: examples/server_client_php

agdb_examples_build:
runs-on: ubuntu-latest
@@ -42,13 +46,14 @@ jobs:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo build ${{ env.RUST_PROJECTS }} --all-features --release
- run: |
cd agdb_api/typescript
npm ci
npm run build
cd ../../examples/server_client_typescript
npm ci
npm run build
- run: npm ci
working-directory: agdb_api/typescript
- run: npm run build
working-directory: agdb_api/typescript
- run: npm ci
working-directory: examples/server_client_typescript
- run: npm run build
working-directory: examples/server_client_typescript

agdb_examples_format:
runs-on: ubuntu-latest
@@ -58,7 +63,11 @@ jobs:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo fmt ${{ env.RUST_PROJECTS }} --check
- run: |
cd examples/server_client_typescript
npm ci
npm run format:check
- run: npm ci
working-directory: examples/server_client_typescript
- run: npm run format:check
working-directory: examples/server_client_typescript
- run: npm ci
working-directory: examples/server_client_php
- run: npx prettier --plugin '@prettier/plugin-php' --check src
working-directory: examples/server_client_php
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@
<a href="/docs/guides/rust.md"><img width="25" src="/docs/images/rust.png" alt="rust"></a>
<a href="/docs/guides/typescript_javascript.md"><img width="25" src="/docs/images/ts.png" alt="ts"></a>
<a href="/docs/guides/typescript_javascript.md"><img width="25" src="/docs/images/js.png" alt="js"></a>
<a href="/docs/guides/php.md"><img width="45" src="/docs/images/php.svg" alt="js"></a>
<img width="25" src="/docs/images/python.png" alt="python">
<img width="25" src="/docs/images/java.png" alt="java">
<img width="25" src="/docs/images/c.png" alt="c">
6 changes: 3 additions & 3 deletions agdb_api/php/ci.sh
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ function analyse() {
}

function format() {
npx prettier --plugin '@prettier/plugin-php' --write src tests
npx prettier --plugin '@prettier/plugin-php' $1 src tests
}

function generate_api() {
@@ -91,9 +91,9 @@ if [[ "$1" == "coverage" ]]; then
elif [[ "$1" == "analyse" ]]; then
analyse
elif [[ "$1" == "format" ]]; then
format
format "--write"
elif [[ "$1" == "format:check" ]]; then
npx prettier --plugin '@prettier/plugin-php' --check src tests
format "--check"
elif [[ "$1" == "generate" ]]; then
if [[ "$2" == "api" ]]; then
generate_api
Loading