-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
136 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
REFERENCE_ID= | ||
API_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Auto Update Commits | ||
on: | ||
# This will trigger on all pushes to all branches. | ||
push: {} | ||
jobs: | ||
autoupdate: | ||
name: autoupdate | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: docker://chinthakagodawita/autoupdate-action:v1 | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
run: | ||
if: github.repository == 'supabase-community/supabase-php' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: '8.1' | ||
extensions: curl | ||
|
||
- name: Install dependencies | ||
uses: php-actions/composer@v6 | ||
|
||
- name: Run Unit Tests | ||
run: ./vendor/bin/phpunit --testsuite test-unit | ||
|
||
- name: Run Integration Tests | ||
run: ./vendor/bin/phpunit --testsuite test-int | ||
|
||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create a GitHub release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: Release ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Integration Tests | ||
|
||
on: | ||
push: {} | ||
|
||
jobs: | ||
phpunit: | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: false | ||
|
||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
php-version: ["8.0", "8.1", "8.2"] | ||
phpunit-versions: ["latest"] | ||
|
||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP ${{ matrix.php-version }} on ${{ matrix.os }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Run Intergation tests | ||
run: ./vendor/bin/phpunit --testsuite test-int | ||
env: | ||
REFERENCE_ID: ${{ secrets.SB_TEST_REFERENCE_ID }} | ||
API_KEY: ${{ secrets.SB_TEST_SERVICE_ROLE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
push: {} | ||
|
||
jobs: | ||
phpunit: | ||
strategy: | ||
matrix: | ||
php-version: [8.0, 8.1, 8.2] | ||
|
||
runs-on: ubuntu-latest | ||
continue-on-error: false | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP ${{ matrix.php-version }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Run Unit tests | ||
run: ./vendor/bin/phpunit --testsuite test-unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,8 @@ | |
/vendor | ||
.env | ||
.env.backup | ||
phpunit.xml | ||
.env.test | ||
.phpdoc | ||
/.phpunit.cache/ | ||
.vscode | ||
composer.lock | ||
.env.test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheResult ="false"> | ||
<testsuites> | ||
<testsuite name="test-unit"> | ||
<directory>./tests/unit</directory> | ||
</testsuite> | ||
<testsuite name="test-int"> | ||
<directory>./tests/integration</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="REFERENCE_ID" value=""/> | ||
<env name="API_KEY" value=""/> | ||
</php> | ||
</phpunit> |