-
Notifications
You must be signed in to change notification settings - Fork 0
Deploy SerpApi PHP library #1
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
Changes from all commits
a0f355d
ed7197e
9cd7283
00fed51
8c286d3
ec39ccb
b75e224
a8369b8
a653e36
26d248a
fef54a4
13b3803
1ac5cb9
045d308
44a0b71
fb0fc9e
b19444f
ef1b0ad
6d14a94
b07dfd3
b467a2d
51218fa
9105ac0
cbd180f
8abc1fb
18f5b8a
c14938e
23bfa58
7e01f1b
15ca9b5
562a338
4989613
81a67be
933cb54
9e6f5d3
85ad95a
6d361e2
2ffb074
14fa0fa
7b117d6
2e43fa7
26c4f2e
1935ce2
2844770
485eba2
0b2c247
28ab232
cacf5ac
b5e6882
8c05231
f7efca7
1bc52a9
53c5dd7
c7fa531
34ea525
306690a
f7277aa
c542f53
a848bd8
c95091d
142b1ba
0670773
a9c5bb4
94f414d
99efa4e
91fafe1
2c2c4ee
8b6dd22
3cfa284
00cee85
6ace6d3
d7247b9
739c517
f494060
4ede2a5
8d10309
2786c8b
9331912
cf5eb25
eba8676
5f0b5f1
15bb390
b66e8ed
80a077d
2197f2e
fbc3bd4
8744780
dc19126
0bf1900
6b584fa
2904346
2107ad6
f6ff9ce
65f58ed
e7693aa
99f8a4e
6ed3e8f
e9baaf4
6761d79
d7d763a
af8d301
9bdc318
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: PHP build | ||
| on: | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] | ||
|
galetahub marked this conversation as resolved.
galetahub marked this conversation as resolved.
galetahub marked this conversation as resolved.
Comment on lines
+3
to
+6
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We only maintain master (no main). The workflow triggers are correct as-is - not planning to change this
Comment on lines
+3
to
+6
Comment on lines
+2
to
+6
|
||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: '8.5' | ||
| extensions: mbstring, intl, curl | ||
| tools: composer | ||
|
|
||
| - name: Install dependencies | ||
| run: composer install --prefer-dist --no-progress | ||
|
|
||
| - name: Run linter | ||
| run: composer run-script lint | ||
|
|
||
| run: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] | ||
|
galetahub marked this conversation as resolved.
Comment on lines
+29
to
+32
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
galetahub marked this conversation as resolved.
|
||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php-versions }} | ||
| extensions: mbstring, intl, curl | ||
|
galetahub marked this conversation as resolved.
|
||
| ini-values: post_max_size=256M, max_execution_time=180 | ||
|
|
||
| - name: Verify required PHP extensions | ||
| run: | | ||
| php -m | grep -i curl | ||
| php -m | grep -i json | ||
|
|
||
| - name: Validate composer.json | ||
| run: composer validate | ||
|
|
||
| - name: Cache Composer packages | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.composer/cache | ||
| key: ${{ runner.os }}-php-${{ matrix.php-versions }}-composer-${{ hashFiles('composer.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-php-${{ matrix.php-versions }}-composer- | ||
|
|
||
| - name: Install dependencies | ||
| run: composer install --prefer-dist --no-progress | ||
|
galetahub marked this conversation as resolved.
|
||
|
|
||
| - name: Run test suite | ||
| run: composer run-script test | ||
| env: | ||
| API_KEY: ${{ secrets.API_KEY }} | ||
|
galetahub marked this conversation as resolved.
Comment on lines
+63
to
+66
Comment on lines
+63
to
+66
Comment on lines
+63
to
+66
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| vendor/* | ||
| .vscode/* | ||
|
|
||
| # PHPUnit | ||
| .phpunit.result.cache | ||
|
|
||
| # MacOS Specific | ||
| .DS_Store | ||
|
|
||
| composer.lock | ||
| composer.phar | ||
| tmp/ | ||
|
|
||
| .env | ||
| .env.* |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,21 @@ | ||||||||||
| The MIT License (MIT) | ||||||||||
|
|
||||||||||
| Copyright (c) 2018-2026 SerpApi | ||||||||||
|
|
||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The MIT license is supposed to have a copyright notice here, or it's a bit difficult to comply with the bit that starts "The above copyright notice".
Suggested change
|
||||||||||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||||||||||
| of this software and associated documentation files (the "Software"), to deal | ||||||||||
| in the Software without restriction, including without limitation the rights | ||||||||||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||||||||
| copies of the Software, and to permit persons to whom the Software is | ||||||||||
| furnished to do so, subject to the following conditions: | ||||||||||
|
|
||||||||||
| The above copyright notice and this permission notice shall be included in all | ||||||||||
| copies or substantial portions of the Software. | ||||||||||
|
|
||||||||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||||||||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||||||||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||||||||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||||||||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||||||||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||||||||
| SOFTWARE. | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Default target | ||
| all: install readme lint test | ||
|
|
||
| # Clean up the project | ||
| clean: | ||
| rm -rf vendor/ | ||
|
|
||
| # Install the necessary libraries and dependencies | ||
| install: | ||
| composer install --prefer-dist --no-progress | ||
|
|
||
| # Run PSR12 lint | ||
| lint: | ||
| vendor/bin/phpcs | ||
|
|
||
| # Run the tests | ||
| test: | ||
| vendor/bin/phpunit -c phpunit.xml | ||
|
|
||
| # Generate README from ERB template | ||
| readme: | ||
| erb -T '-' README.md.erb > README.md |
Uh oh!
There was an error while loading. Please reload this page.