Skip to content

Commit

Permalink
Use large GitHub runner (#221)
Browse files Browse the repository at this point in the history
build(runner): change runner groups

---------

Co-authored-by: Mohit Tejani <[email protected]>
  • Loading branch information
parfeon and mohitpubnub authored May 29, 2024
1 parent 3718f01 commit c6d5114
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 41 deletions.
11 changes: 6 additions & 5 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 Down
30 changes: 16 additions & 14 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,24 +28,25 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
publish-nuget:
name: Publish to NuGet
runs-on: windows-2019
needs: check-release
if: needs.check-release.outputs.release == 'true'
runs-on:
group: windows-gh
defaults:
run:
shell: powershell
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
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
dotnet-version: |
2.1.519
5.0.x
6.0.x
Expand All @@ -59,30 +60,31 @@ jobs:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: .\\.github\\workflows\\release\\publish-packages.ps1
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: ${{ github.workspace }}\.github\.release\artifacts\*.nupkg
retention-days: 1
publish:
name: Publish package
runs-on: ubuntu-latest
needs: publish-nuget
runs-on:
group: Default
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
- 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: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: nuget-packages
path: ${{ github.workspace }}/.github/.release/artifacts
Expand Down
36 changes: 20 additions & 16 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ concurrency:
jobs:
tests:
name: Integration and Unit tests
runs-on: windows-2019
runs-on:
group: windows-gh
defaults:
run:
shell: powershell
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Checkout actions
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
Expand All @@ -27,9 +28,10 @@ jobs:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.x
5.0.x
6.0.x
7.0.x
Expand All @@ -38,26 +40,27 @@ jobs:
WORKSPACE_PATH: ${{ github.workspace }}
run: .\\.github\\workflows\\release\\build-packages.ps1
# - name: Run unit tests
# env:
# env:
# PN_PUB_KEY: ${{ secrets.PN_PUB_KEY }}
# PN_SUB_KEY: ${{ secrets.PN_SUB_KEY }}
# PN_SEC_KEY: ${{ secrets.PN_SEC_KEY }}
# run: dotnet test .\\src\\UnitTests\\PubnubApiPCL.Tests\\PubnubApiPCL.Tests.csproj --verbosity normal --logger trx
# PN_SEC_KEY: ${{ secrets.PN_SEC_KEY }}
# run: dotnet test .\\src\\UnitTests\\PubnubApiPCL.Tests\\PubnubApiPCL.Tests.csproj --verbosity normal --logger trx
- name: Cancel workflow runs for commit on error
if: failure()
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
acceptance-tests:
name: Acceptance tests
runs-on: windows-2019
runs-on:
group: windows-gh
defaults:
run:
shell: powershell
working-directory: ./src
steps:
- name: Checkout Project
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout mock-server action
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
Expand All @@ -68,7 +71,7 @@ jobs:
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup .NET 6.0.x
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore dependencies
Expand All @@ -78,20 +81,20 @@ jobs:
cd ./UnitTests/AcceptanceTests
dotnet build --no-restore
- name: Run acceptance tests
env:
env:
PN_PAM_PUB_KEY: ${{ secrets.SDK_PAM_PUB_KEY }}
PN_PAM_SUB_KEY: ${{ secrets.SDK_PAM_SUB_KEY }}
PN_PAM_SEC_KEY: ${{ secrets.SDK_PAM_SEC_KEY }}
PN_PAM_SEC_KEY: ${{ secrets.SDK_PAM_SEC_KEY }}
PN_PUB_KEY: ${{ secrets.SDK_PUB_KEY }}
PN_SUB_KEY: ${{ secrets.SDK_SUB_KEY }}
PN_SEC_KEY: ${{ secrets.SDK_SEC_KEY }}
PN_SEC_KEY: ${{ secrets.SDK_SEC_KEY }}
run: |
Copy-Item -Path "${{ github.workspace }}/sdk-specifications/features/access/*" -Destination "${{ github.workspace }}/src/UnitTests/AcceptanceTests/Features" -Recurse
cd ./UnitTests/AcceptanceTests
dotnet test --no-build --verbosity normal --logger trx --results-directory ./results
- name: Upload acceptance tests reports
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: acceptance-test-reports
path: |
Expand All @@ -102,8 +105,9 @@ jobs:
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
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"
12 changes: 7 additions & 5 deletions .github/workflows/run-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ concurrency:
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 @@ -30,8 +31,9 @@ jobs:
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
all-validations:
name: Validations
runs-on: ubuntu-latest
needs: [pubnub-yml]
runs-on:
group: Default
steps:
- name: Validations summary
run: echo -e "\033[38;2;95;215;0m\033[1mAll validations passed"
run: echo -e "\033[38;2;95;215;0m\033[1mAll validations passed"
3 changes: 2 additions & 1 deletion src/Api/PubnubApi/PubnubApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<!--
<PropertyGroup Condition=" '$(TargetFramework)' == 'net35' ">
<DefineConstants>$(DefineConstants);NET35</DefineConstants>
<FrameworkPathOverride>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client</FrameworkPathOverride>
</PropertyGroup>
</PropertyGroup>-->
<PropertyGroup Condition=" '$(TargetFramework)' == 'net40' ">
<DefineConstants>$(DefineConstants);NET40</DefineConstants>
</PropertyGroup>
Expand Down

0 comments on commit c6d5114

Please sign in to comment.