Skip to content

Commit

Permalink
Switch runner to MacOS for testing/publishing KMP artifacts (#296)
Browse files Browse the repository at this point in the history
* Switch runner to `macos-gh`

---------

Co-authored-by: Serhii Mamontov <[email protected]>
  • Loading branch information
wkal-pubnub and parfeon authored Nov 20, 2024
1 parent 98544a8 commit 7fada4b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 9 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ jobs:
name: Check release required
if: github.event.pull_request.merged && endsWith(github.repository, '-private') != true
runs-on:
group: organization/Default
group: macos-gh
outputs:
release: ${{ steps.check.outputs.ready }}
steps:
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '21'
- name: Checkout actions
uses: actions/checkout@v4
with:
Expand All @@ -31,8 +36,13 @@ jobs:
needs: check-release
if: needs.check-release.outputs.release == 'true'
runs-on:
group: organization/Default
group: macos-gh
steps:
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '21'
- name: Checkout repository
uses: actions/checkout@v4
with:
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ jobs:
tests:
name: Integration and Unit tests
runs-on:
group: organization/Default
group: macos-gh
steps:
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "21"
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout actions
Expand Down Expand Up @@ -43,7 +48,7 @@ jobs:
acceptance-tests:
name: Acceptance tests
runs-on:
group: organization/Default
group: macos-gh
env:
pubKey: somePubKey
subKey: someSubKey
Expand All @@ -53,6 +58,15 @@ jobs:
serverHostPort: "localhost:8090"
serverMock: true
steps:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "21"
- name: Checkout project
uses: actions/checkout@v4
- name: Checkout mock-server action
Expand All @@ -77,7 +91,8 @@ jobs:
${{ runner.os }}-gradle-
- name: Run acceptance tests (optional)
run: |
ln -s /home/runner/work/kotlin/kotlin/sdk-specifications pubnub-kotlin-core/core-impl/src/test/resources/sdk-specifications
pwd
ln -s /Users/github/actions-runner/_work/kotlin/kotlin/sdk-specifications pubnub-kotlin/pubnub-kotlin-impl/src/test/resources/sdk-specifications
./gradlew cucumber --tests RunBetaCucumberTest -Dcucumber.features="../../sdk-specifications/features/" -i
continue-on-error: true
- name: Run acceptance tests (required)
Expand All @@ -96,7 +111,7 @@ jobs:
name: Tests
needs: [tests, acceptance-tests]
runs-on:
group: organization/Default
group: macos-gh
steps:
- name: Tests summary
run: echo -e "\033[38;2;95;215;0m\033[1mAll tests successfully passed"
11 changes: 8 additions & 3 deletions .github/workflows/run-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
pubnub-yml:
name: "Validate .pubnub.yml"
runs-on:
group: organization/Default
group: macos-gh
steps:
- name: Checkout project
uses: actions/checkout@v4
Expand All @@ -35,8 +35,13 @@ jobs:
build-validation:
name: Validate build
runs-on:
group: organization/Default
group: macos-gh
steps:
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "21"
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
Expand All @@ -57,7 +62,7 @@ jobs:
name: Validations
needs: [pubnub-yml, build-validation]
runs-on:
group: organization/Default
group: macos-gh
steps:
- name: Validations summary
run: echo -e "\033[38;2;95;215;0m\033[1mAll validations passed"
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ pluginManagement {
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}

dependencyResolutionManagement {
repositories {
mavenCentral()
Expand Down

0 comments on commit 7fada4b

Please sign in to comment.