-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Replace releaser with release please
- Loading branch information
Showing
16 changed files
with
258 additions
and
81 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
name: Build Documentation | ||
description: 'Build Documentation.' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Build Documentation | ||
shell: bash | ||
run: | | ||
phpdoc \ | ||
-d src \ | ||
-t "docs" \ | ||
--ignore Impl/ \ | ||
--ignore '*/Impl/' \ | ||
--ignore-tags psalm-param \ | ||
--ignore-tags psalm-var \ | ||
--ignore-tags psalm-return \ | ||
--visibility public \ | ||
--defaultpackagename "LaunchDarkly" \ | ||
--title "LaunchDarkly PHP SDK phpredis integration" |
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,47 @@ | ||
name: CI Workflow | ||
description: 'Shared CI workflow.' | ||
inputs: | ||
php-version: | ||
description: 'Which version of PHP should we setup?' | ||
required: false | ||
default: 7.4 | ||
use-lowest-dependencies: | ||
description: 'Should we prefer the lowest dependency version?' | ||
type: boolean | ||
required: false | ||
default: false | ||
shared-test-version: | ||
description: 'Which version of the shared test package should we required' | ||
required: false | ||
default: 4.x-dev | ||
token: | ||
description: 'Token used to prevent composer rate limiting' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 | ||
with: | ||
php-version: ${{ inputs.php-version }} | ||
tools: phpdoc:3.1.2 | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.token }} | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: composer install --no-progress | ||
|
||
- name: Require appropriate shared tests package | ||
shell: bash | ||
run: composer require --dev 'launchdarkly/server-sdk-shared-tests:${{ inputs.shared-test-version }}' | ||
|
||
- name: Downgrade to lowest versions | ||
if: ${{ inputs.use-lowest-dependencies }} | ||
shell: bash | ||
run: composer update --prefer-lowest --prefer-stable | ||
|
||
- name: Run unit tests | ||
shell: bash | ||
run: ./vendor/bin/phpunit |
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 @@ | ||
name: Publish Documentation | ||
description: 'Publish the documentation to GitHub pages' | ||
inputs: | ||
token: | ||
description: 'Token to use for publishing.' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: launchdarkly/gh-actions/actions/[email protected] | ||
name: 'Publish to Github pages' | ||
with: | ||
docs_path: docs | ||
github_token: { token } # For the shared action the token should be a 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,70 @@ | ||
name: Run CI | ||
on: | ||
push: | ||
branches: [ main ] | ||
paths-ignore: | ||
- '**.md' # Do not need to run CI for markdown changes. | ||
pull_request: | ||
branches: [ main ] | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
ci-build: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
# SDK 4.x PHP >= 7.3 & <8.0 | ||
- php-verison: 7.3 | ||
use-lowest-dependencies: true | ||
shared-test-version: 4.x-dev | ||
- php-verison: 7.4 | ||
use-lowest-dependencies: true | ||
shared-test-version: 4.x-dev | ||
|
||
# SDK 4.x PHP >= 8.0 | ||
- php-verison: 8.0 | ||
use-lowest-dependencies: true | ||
shared-test-version: 4.x-dev | ||
- php-verison: 8.1 | ||
use-lowest-dependencies: true | ||
shared-test-version: 4.x-dev | ||
|
||
# SDK 5.x PHP >= 8.0 | ||
- php-verison: 8.0 | ||
use-lowest-dependencies: false | ||
shared-test-version: 5.x-dev | ||
- php-verison: 8.1 | ||
use-lowest-dependencies: false | ||
shared-test-version: 5.x-dev | ||
- php-verison: 8.2 | ||
use-lowest-dependencies: false | ||
shared-test-version: 5.x-dev | ||
|
||
# SDK 6.x PHP >= 8.1 | ||
- php-verison: 8.1 | ||
use-lowest-dependencies: false | ||
shared-test-version: dev-main | ||
- php-verison: 8.2 | ||
use-lowest-dependencies: false | ||
shared-test-version: dev-main | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # If you only need the current version keep this. | ||
|
||
- uses: ./.github/actions/ci | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
use-lowest-dependencies: ${{ matrix.use-lowest-dependencies }} | ||
shared-test-version: ${{ matrix.shared-test-version }} | ||
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,12 @@ | ||
name: Lint PR title | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
lint-pr-title: | ||
uses: launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main |
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,32 @@ | ||
on: | ||
workflow_dispatch: | ||
|
||
name: Publish Documentation | ||
jobs: | ||
build-publish: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
|
||
permissions: | ||
contents: write # Needed in this case to write github pages. | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build and Test | ||
uses: ./.github/actions/ci | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build documentation | ||
uses: ./.github/actions/build-docs | ||
|
||
- name: Publish Documentation | ||
uses: ./.github/actions/publish-docs | ||
with: | ||
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,47 @@ | ||
name: Run Release Please | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release-package: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # Contents and pull-requests are for release-please to make releases. | ||
pull-requests: write | ||
|
||
services: | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
|
||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
command: manifest | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
default-branch: main | ||
|
||
- uses: actions/checkout@v4 | ||
if: ${{ steps.release.outputs.releases_created }} | ||
with: | ||
fetch-depth: 0 # If you only need the current version keep this. | ||
|
||
- name: Build and Test | ||
if: ${{ steps.release.outputs.releases_created }} | ||
uses: ./.github/actions/ci | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build documentation | ||
if: ${{ steps.release.outputs.releases_created }} | ||
uses: ./.github/actions/build-docs | ||
|
||
- uses: ./.github/actions/publish-docs | ||
if: ${{ steps.release.outputs.releases_created }} | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.