This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
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
1 parent
ffc2e94
commit d01a865
Showing
129 changed files
with
1,480 additions
and
12,056 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,99 @@ | ||
name: CI Action | ||
inputs: | ||
run_tests: | ||
description: 'If true, run unit tests, otherwise skip them.' | ||
required: false | ||
default: 'true' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Download snk for signing assemblies | ||
shell: bash | ||
run: aws s3 cp s3://launchdarkly-releaser/dotnet/LaunchDarkly.ClientSdk.snk LaunchDarkly.ClientSdk.snk | ||
|
||
- name: Setup dotnet build tools | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 7.0 | ||
|
||
- name: Install MAUI Workload | ||
shell: bash | ||
run: dotnet workload install maui-android maui-ios maui-windows maui-maccatalyst --ignore-failed-sources | ||
|
||
- name: Restore Dependencies | ||
shell: bash | ||
run: dotnet restore src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj | ||
|
||
# - name: Build for NetStandard2.0 | ||
# shell: bash | ||
# run: dotnet build /p:Configuration=release /p:TargetFramework=netstandard2.0 src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj | ||
|
||
- name: Build for Net7 | ||
shell: bash | ||
run: dotnet build /p:Configuration=release /p:TargetFramework=net7.0 src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj | ||
|
||
- name: Build for Net7-android | ||
shell: bash | ||
run: dotnet build /p:Configuration=release /p:TargetFramework=net7.0-android src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj | ||
|
||
- name: Build for Net7-ios | ||
shell: bash | ||
run: dotnet build /p:Configuration=release /p:TargetFramework=net7.0-ios src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj | ||
|
||
- name: Build for Net7-windows | ||
shell: bash | ||
run: dotnet build /p:Configuration=release /p:TargetFramework=net7.0-maccatalyst src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj | ||
|
||
- name: Build for Net7-maccatalyst | ||
shell: bash | ||
run: dotnet build /p:Configuration=release /p:TargetFramework=net7.0-windows src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj | ||
|
||
- name: Run Unit Tests for Net7 | ||
run: | | ||
dotnet restore tests/LaunchDarkly.ClientSdk.Tests | ||
dotnet test -v=normal \ | ||
--logger:"junit;LogFilePath=/tmp/circle-reports/unit-tests.xml" \ | ||
tests/LaunchDarkly.ClientSdk.Tests/LaunchDarkly.ClientSdk.Tests.csproj | ||
- name: Build Contract Tests | ||
if: inputs.run_tests == 'true' | ||
run: dotnet build contract-tests/TestService.csproj | ||
|
||
- name: Run Contract Tests | ||
if: inputs.run_tests == 'true' | ||
run: | | ||
dotnet contract-tests/bin/release/net7.0/ContractTestService.dll > test-service.log 2>&1 & disown | ||
curl -s https://raw.githubusercontent.com/launchdarkly/sdk-test-harness/main/downloader/run.sh | VERSION=v2 PARAMS="-url http://localhost:8000 -debug -stop-service-at-end \ | ||
-junit /tmp/circle-reports/contract-tests-junit.xml" sh | ||
- name: Build Test App | ||
if: inputs.run_tests == 'true' | ||
run: | | ||
dotnet build /restore /p:Configuration=release \ | ||
tests/LaunchDarkly.ClientSdk.Device.Tests/LaunchDarkly.ClientSdk.Device.Tests.csproj | ||
# - name: Set up JDK 17 | ||
# if: inputs.run_tests == 'true' | ||
# uses: actions/setup-java@v3 | ||
# with: | ||
# java-version: '17' | ||
# distribution: 'temurin' | ||
|
||
# - name: Setup Android Manager | ||
# if: inputs.run_tests == 'true' | ||
# uses: android-actions/setup-android@v3 | ||
|
||
# TODO: Tests are not auto executing, so this is commented out. For now this must be done manually. | ||
# - name: Run Android Test App on Emulator | ||
# if: inputs.run_tests == 'true' | ||
# uses: reactivecircus/android-emulator-runner@v2 | ||
# with: | ||
# api-level: 27 | ||
# script: | | ||
# dotnet run --framework net7.0-android --project tests/LaunchDarkly.ClientSdk.Device.Tests/LaunchDarkly.ClientSdk.Device.Tests.csproj | ||
# adb install tests/LaunchDarkly.ClientSdk.Device.Tests/bin/release/net7.0-android/com.LaunchDarkly.ClientSdk.Device.Tests-Signed.apk | ||
# ( adb logcat DOTNET:D AndroidRuntime:D & ) | tee test-run.log | grep -q 'Tests run:' | ||
# cat test-run.log | tr -s ' ' | cut -d ' ' -f 1,2,7- | ||
# if grep '\[FAIL\]' test-run.log >/dev/null; then exit 1; fi | ||
|
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: Run CI | ||
on: | ||
push: | ||
branches: [main, 'feat/**'] | ||
paths-ignore: | ||
- '**.md' # Do not need to run CI for markdown changes. | ||
pull_request: | ||
branches: [main, 'feat/**'] | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
ci-build: | ||
runs-on: macos-latest-large | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # If you only need the current version keep this. | ||
|
||
- uses: launchdarkly/gh-actions/actions/[email protected] | ||
name: Get secrets | ||
with: | ||
aws_assume_role: ${{ vars.AWS_ROLE_ARN }} | ||
ssm_parameter_pairs: '/production/common/releasing/digicert/host = DIGICERT_HOST,/production/common/releasing/digicert/api_key = DIGICERT_API_KEY,/production/common/releasing/digicert/client_cert_file_b64 = DIGICERT_CLIENT_CERT_FILE_B64,/production/common/releasing/digicert/client_cert_password = DIGICERT_CLIENT_CERT_PASSWORD,/production/common/releasing/digicert/code_signing_cert_sha1_hash = DIGICERT_CODE_SIGNING_CERT_SHA1_HASH' | ||
|
||
- uses: ./.github/actions/ci |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.