Skip to content

Commit

Permalink
Use large GitHub runner (#174)
Browse files Browse the repository at this point in the history
build(runner): use hosted runner

build(runner): update runner group

fix(unit-tests): fixing unit test for EmitMessagesEffect

build(workflow): env file for macOS

Replacing `.userInteractive` with `.default` in AtomicTests.swift

---------

Signed-off-by: Serhii Mamontov <[email protected]>
Co-authored-by: Matthew Meier <[email protected]>
Co-authored-by: jguz-pubnub <[email protected]>
  • Loading branch information
3 people authored Jun 7, 2024
1 parent 0586d55 commit eb3234d
Show file tree
Hide file tree
Showing 15 changed files with 238 additions and 204 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/commands-handler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,25 @@ jobs:
process:
name: Process command
if: github.event.issue.pull_request && endsWith(github.repository, '-private') != true
runs-on: ubuntu-latest
runs-on:
group: Default
steps:
- name: Check referred user
id: user-check
env:
env:
CLEN_BOT: ${{ secrets.CLEN_BOT }}
run: echo "expected-user=${{ startsWith(github.event.comment.body, format('@{0} ', env.CLEN_BOT)) }}" >> $GITHUB_OUTPUT
- name: Regular comment
if: steps.user-check.outputs.expected-user != 'true'
run: echo -e "\033[38;2;19;181;255mThis is regular commit which should be ignored.\033[0m"
- name: Checkout repository
if: steps.user-check.outputs.expected-user == 'true'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
token: ${{ secrets.GH_TOKEN }}
- name: Checkout release actions
if: steps.user-check.outputs.expected-user == 'true'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
Expand All @@ -40,4 +41,4 @@ jobs:
with:
token: ${{ secrets.GH_TOKEN }}
listener: ${{ secrets.CLEN_BOT }}
jira-api-key: ${{ secrets.JIRA_API_KEY }}
jira-api-key: ${{ secrets.JIRA_API_KEY }}
17 changes: 9 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ name: Automated product release

on:
pull_request:
branches: [ master ]
types: [ closed ]

branches: [master]
types: [closed]

jobs:
check-release:
name: Check release required
runs-on: ubuntu-latest
if: github.event.pull_request.merged && endsWith(github.repository, '-private') != true
runs-on:
group: Default
outputs:
release: ${{ steps.check.outputs.ready }}
steps:
- name: Checkout actions
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
Expand All @@ -28,18 +28,19 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
publish:
name: Publish package
runs-on: macos-12
needs: check-release
if: needs.check-release.outputs.release == 'true'
runs-on:
group: macos-gh
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# This should be the same as the one specified for on.pull_request.branches
ref: master
token: ${{ secrets.GH_TOKEN }}
- name: Checkout actions
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
Expand Down
60 changes: 41 additions & 19 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,54 @@ defaults:
run:
shell: bash

env:
LANG: en_US.UTF-8
LANGUAGE: en_US.UTF-8
LC_ALL: en_US.UTF-8
LC_CTYPE: en_US.UTF-8

jobs:
tests:
name: Integration and Unit tests
runs-on: macos-12
runs-on:
group: macos-gh
strategy:
matrix:
environment: [iOS, tvOS, macOS]
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup Ruby 2.6.6
- name: Checkout actions
uses: actions/checkout@v4
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
token: ${{ secrets.GH_TOKEN }}
path: .github/.release/actions
- name: Setup Ruby 3.2.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.6
ruby-version: 3.2.2
bundler-cache: true
- name: Cache installed Pods
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
${{ runner.os }}-pods-
- name: Cache Swift Package Manager
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.build
~/Library/Developer/Xcode/DerivedData/**/SourcePackages/checkouts
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
${{ runner.os }}-spm-
- name: Pre-load simulators list
if: ${{ matrix.environment != 'macOS' }}
run: xcrun simctl list -j
Expand All @@ -53,33 +68,39 @@ jobs:
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
acceptance-tests:
name: Acceptance tests
runs-on: macos-12
runs-on:
group: macos-gh
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Ruby 2.6.6
uses: actions/checkout@v4
- name: Setup Ruby 3.2.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.6
ruby-version: 3.2.2
bundler-cache: true
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Cache installed Pods
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
${{ runner.os }}-pods-
- name: Cache Swift Package Manager
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.build
~/Library/Developer/Xcode/DerivedData/**/SourcePackages/checkouts
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
${{ runner.os }}-spm-
- name: Checkout mock-server action
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
Expand All @@ -103,15 +124,16 @@ jobs:
bundle exec fastlane contract_test --env contract-beta && FASTLANE_EXITCODE="${PIPESTATUS[0]}"
mv Results/CucumberishTestResults-PubNubContractTestsBeta.json Results/beta.json
- name: Upload acceptance tests reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: acceptance-test-reports
path: Results/*.json
retention-days: 7
all-tests:
name: Tests
runs-on: ubuntu-latest
needs: [tests, acceptance-tests]
runs-on:
group: Default
steps:
- name: Tests summary
run: echo -e "\033[38;2;95;215;0m\033[1mAll tests successfully passed"
41 changes: 25 additions & 16 deletions .github/workflows/run-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ defaults:
run:
shell: bash

env:
LANG: en_US.UTF-8
LANGUAGE: en_US.UTF-8
LC_ALL: en_US.UTF-8

jobs:
pubnub-yml:
name: "Validate .pubnub.yml"
runs-on: ubuntu-latest
runs-on:
group: Default
steps:
- name: Checkout project
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout validator action
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
Expand All @@ -33,29 +39,30 @@ jobs:
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
package-managers-validation:
name: Validate package managers
runs-on: macos-12
runs-on:
group: macos-gh
strategy:
matrix:
managers: [CocoaPods, Swift Package Manager]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Checkout actions
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
token: ${{ secrets.GH_TOKEN }}
path: .github/.release/actions
- name: Setup Ruby 2.6.6
- name: Setup Ruby 3.2.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.6
ruby-version: 3.2.2
bundler-cache: true
- name: Cache Swift Package Manager
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.build
Expand All @@ -70,26 +77,27 @@ jobs:
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
demo-app-validation:
name: Validate demo application
runs-on: macos-12
runs-on:
group: macos-gh
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Checkout actions
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
token: ${{ secrets.GH_TOKEN }}
path: .github/.release/actions
- name: Setup Ruby 2.6.6
- name: Setup Ruby 3.2.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.6
ruby-version: 3.2.2
bundler-cache: true
- name: Cache Swift Package Manager
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.build
Expand All @@ -104,8 +112,9 @@ jobs:
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
all-validations:
name: Validations
runs-on: ubuntu-latest
needs: [pubnub-yml, package-managers-validation, demo-app-validation]
runs-on:
group: Default
steps:
- name: Validations summary
run: echo -e "\033[38;2;95;215;0m\033[1mAll validations passed"
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"

gem "cocoapods", :github => "cocoapods/cocoapods", :branch => "master"
gem "cocoapods"

gem "fastlane"
gem "slather"
Expand Down
Loading

0 comments on commit eb3234d

Please sign in to comment.