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

go: add performance tests runner #142

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .github/workflows/monthly-copyright-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
-GitHubToken ${{ secrets.token }} `
-RepoName ${{ inputs.repo-name }} `
-OrgName ${{ inputs.org-name }} `
-Branch ${{ github.ref_name }} `
-GitHubUser ${{ inputs.user }} `
-GitHubEmail ${{ inputs.email }} `
-DryRun $DryRun
5 changes: 5 additions & 0 deletions .github/workflows/nightly-data-file-change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ on:
required: false
type: string
default: false
common-ci-ref:
type: string
default: ''
secrets:
token:
required: true
Expand All @@ -43,6 +46,7 @@ jobs:
with:
repository: ${{ inputs.org-name }}/common-ci
path: common
ref: ${{ inputs.common-ci-ref }}

- name: Generate Accessors
shell: pwsh
Expand All @@ -53,6 +57,7 @@ jobs:
-GitHubToken ${{ secrets.token }} `
-RepoName ${{ inputs.repo-name }} `
-OrgName ${{ inputs.org-name }} `
-Branch ${{ github.ref_name }} `
-DeviceDetectionKey ${{ secrets.device-detection-key }} `
-DeviceDetectionUrl "${{ secrets.device-detection-url }}" `
-GitHubUser ${{ inputs.user }} `
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/nightly-documentation-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ on:
required: false
type: string
default: false
common-ci-ref:
type: string
default: ''
separate-examples:
required: false
type: string
Expand All @@ -31,26 +34,25 @@ on:
required: true

jobs:
nightly-documentation-update:
NightlyDocumentationUpdate:
name: Nightly Documentation Update
runs-on: ubuntu-latest

if: ${{ github.ref_name == 'main' }} # main only, for now
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Checkout reusable workflow dir
- name: Checkout Common
uses: actions/checkout@v4
with:
repository: ${{ inputs.org-name }}/common-ci
path: common

ref: ${{ inputs.common-ci-ref }}

- name: Generate Documentation
shell: pwsh
working-directory: ${{ github.workspace }}/common/
run: |
$DryRun = [bool]::Parse( "${{ inputs.dryrun }}" )
$SeparateExamples = [bool]::Parse( "${{ inputs.separate-examples}}" )
. ${{ github.workspace }}/common/nightly-documentation-update.ps1 `
./nightly-documentation-update.ps1 `
-GitHubToken ${{ secrets.token }} `
-RepoName ${{ inputs.repo-name }} `
-OrgName ${{ inputs.org-name }} `
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-package-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
-GitHubToken ${{ secrets.token }} `
-RepoName ${{ inputs.repo-name }} `
-OrgName ${{ inputs.org-name }} `
-RunId ${{ github.run_id }} `
-Branch ${{ github.ref_name }} `
-GitHubUser ${{ inputs.user }} `
-GitHubEmail ${{ inputs.email }} `
-DryRun $DryRun
51 changes: 24 additions & 27 deletions .github/workflows/nightly-prs-to-main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
name: Nightly PRs to Main
#
# TODO: switch all repos to the new file name (`nightly-publish.yml`), and delete this file
#
name: Nightly Pull Requests

on:
workflow_call:
inputs:
repo-name:
required: true
type: string
required: true
org-name:
required: false
type: string
default: 51degrees
default: 51Degrees
user:
required: false
type: string
default: Automation51D
email:
required: false
type: string
default: "51DCI@51Degrees.com"
default: 51DCI@51degrees.com
dryrun:
required: false
type: string
default: false
cache-assets:
default: false
type: boolean
common-ci-ref:
required: false
type: string
default: ''
prs: # Comma-separated list of pull request IDs to build
required: false
type: string
secrets:
token:
Expand Down Expand Up @@ -62,11 +58,15 @@ on:
UsePublishTests:
PearlLicense:

defaults:
run:
shell: pwsh
working-directory: ./common

jobs:
# Get all the pull requests that are going to main
Get_Pull_Requests:
outputs:
pull_request_ids: ${{ steps.get_pull_requests.outputs.pull_request_ids }}
GetPullRequests:
name: Get Pull Requests
runs-on: ubuntu-latest
steps:
- name: Checkout Common
Expand All @@ -79,30 +79,27 @@ jobs:
# Get all the pull requests into main, and output the ids
- name: Get Pull Requests
id: get_pull_requests
shell: pwsh
working-directory: ${{ github.workspace }}/common/
env:
PULL_REQUEST_IDS: ${{ inputs.prs }}
run: |
. ${{ github.workspace }}/common/nightly-pr-to-main_get-prs.ps1 `
./nightly-pull-requests.get-prs.ps1 `
-RepoName ${{ inputs.repo-name }} `
-OrgName ${{ inputs.org-name }} `
-VariableName PullRequestIds `
-Branch ${{ github.ref_name }} `
-GitHubToken ${{ secrets.token }} `
-GitHubUser ${{ inputs.user }} `
-GitHubEmail ${{ inputs.email }} `
-GitHubOutput $Env:GITHUB_OUTPUT
-GitHubOutput $Env:GITHUB_OUTPUT
outputs:
pull_request_ids: ${{ steps.get_pull_requests.outputs.pull_request_ids }}

# Run the common workflow on each pull request
Nightly_PR_to_Main:
needs: Get_Pull_Requests
name: Nightly PR to Main - ${{ matrix.id }}
NightlyPullRequest:
needs: GetPullRequests
strategy:
fail-fast: false
matrix:
id: ${{ fromJSON(needs.Get_Pull_Requests.outputs.pull_request_ids) }}

uses: ./.github/workflows/nightly-pr-to-main.yml
id: ${{ fromJSON(needs.GetPullRequests.outputs.pull_request_ids) }}
name: Nightly PR - ${{ matrix.id }}
uses: ./.github/workflows/nightly-pull-request.yml
with:
repo-name: ${{ inputs.repo-name }}
org-name: ${{ inputs.org-name }}
Expand Down
Loading