Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use large GitHub runner #162

Merged
merged 2 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/commands-handler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,26 @@ jobs:
process:
name: Process command
if: github.event.issue.pull_request && endsWith(github.repository, '-private') != true
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
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 +42,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 }}
21 changes: 12 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ 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
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
if: github.event.pull_request.merged && endsWith(github.repository, '-private') != true
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,17 +29,19 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
publish:
name: Publish package
runs-on: macos-11
runs-on:
group: Default

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be "Default Larger Runners" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macOS is in different group

labels: macos-latest
needs: check-release
if: needs.check-release.outputs.release == 'true'
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 release actions
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
Expand All @@ -54,4 +57,4 @@ jobs:
uses: ./.github/.release/actions/actions/test-reports/upload
with:
token: ${{ secrets.GH_TOKEN }}
acceptance-tests-workflow: Tests
acceptance-tests-workflow: Tests
40 changes: 23 additions & 17 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,39 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PAM_PUBLISH_KEY: ${{ secrets.PAM_PUBLISH_KEY }}
PAM_SUBSCRIBE_KEY: ${{ secrets.PAM_SUBSCRIBE_KEY }}
PAM_SECRET_KEY: ${{ secrets.PAM_SECRET_KEY }}
PUBLISH_KEY: ${{ secrets.PUBLISH_KEY }}
SUBSCRIBE_KEY: ${{ secrets.SUBSCRIBE_KEY }}
PAM_PUBLISH_KEY: ${{ secrets.SDK_PAM_PUB_KEY }}
PAM_SUBSCRIBE_KEY: ${{ secrets.SDK_PAM_SUB_KEY }}
PAM_SECRET_KEY: ${{ secrets.SDK_PAM_SEC_KEY }}
PUBLISH_KEY: ${{ secrets.SDK_PUB_KEY }}
SUBSCRIBE_KEY: ${{ secrets.SDK_SUB_KEY }}
defaults:
run:
shell: bash

jobs:
tests:
name: Integration and Unit tests
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
strategy:
fail-fast: true
matrix:
matrix:
go: [1.16.15, 1.17.13, 1.18.9, 1.19.4]
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 Go ${{ matrix.go }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: true
Expand All @@ -48,12 +50,14 @@ jobs:
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
acceptance-tests:
name: Acceptance tests
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
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 @@ -64,7 +68,7 @@ jobs:
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup Go 1.19.4
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19.4
cache: true
Expand All @@ -78,7 +82,7 @@ jobs:
cd tests/contract
go test -path ../../sdk-specifications/features -tagsFilter "~@skip && ~@na=go && ~@beta" -format "junit:main.xml"
- name: Expose acceptance tests reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: acceptance-test-reports
Expand All @@ -91,8 +95,10 @@ jobs:
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
all-tests:
name: Tests
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
needs: [tests, acceptance-tests]
steps:
- name: Tests summary
run: echo -e "\033[38;2;95;215;0m\033[1mAll tests successfully passed"
run: echo -e "\033[38;2;95;215;0m\033[1mAll tests successfully passed"
14 changes: 9 additions & 5 deletions .github/workflows/run-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ defaults:
jobs:
pubnub-yml:
name: "Validate .pubnub.yml"
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
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,8 +35,10 @@ jobs:
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
all-validations:
name: Validations
runs-on: ubuntu-latest
runs-on:
group: Default Larger Runners
labels: ubuntu-latest-m
needs: [pubnub-yml]
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"
Loading