From 4229dacb12741e2ded7d2adaa861adfd0b8fccfa Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Wed, 21 Jun 2023 21:57:17 +0200 Subject: [PATCH 1/6] added PS module caching --- .github/workflows/build_and_test.yml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 8d36a0be..5bf3f978 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -14,6 +14,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Setup PowerShell module cache + id: cacher + uses: actions/cache@v3 + with: + path: "~/.local/share/powershell/Modules" + key: ${{ runner.os }}-PSModules - name: Setup shell: pwsh run: | @@ -40,6 +46,12 @@ jobs: with: name: Release path: ./Release/ + - name: Setup PowerShell module cache + id: cacher + uses: actions/cache@v3 + with: + path: "~/.local/share/powershell/Modules" + key: ${{ runner.os }}-PSModules - name: Setup shell: powershell run: | @@ -61,6 +73,12 @@ jobs: with: name: Release path: ./Release/ + - name: Setup PowerShell module cache + id: cacher + uses: actions/cache@v3 + with: + path: "~/.local/share/powershell/Modules" + key: ${{ runner.os }}-PSModules - name: Setup shell: pwsh run: | @@ -82,6 +100,12 @@ jobs: with: name: Release path: ./Release/ + - name: Setup PowerShell module cache + id: cacher + uses: actions/cache@v3 + with: + path: "~/.local/share/powershell/Modules" + key: ${{ runner.os }}-PSModules - name: Setup shell: pwsh run: | @@ -103,6 +127,12 @@ jobs: with: name: Release path: ./Release/ + - name: Setup PowerShell module cache + id: cacher + uses: actions/cache@v3 + with: + path: "~/.local/share/powershell/Modules" + key: ${{ runner.os }}-PSModules - name: Setup shell: pwsh run: | @@ -128,6 +158,12 @@ jobs: with: name: Release path: ./Release/ + - name: Setup PowerShell module cache + id: cacher + uses: actions/cache@v3 + with: + path: "~/.local/share/powershell/Modules" + key: ${{ runner.os }}-PSModules - name: Setup shell: pwsh run: | From c453f5b52a19f71142fdf404af17dda450de689d Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Wed, 21 Jun 2023 21:57:33 +0200 Subject: [PATCH 2/6] added upload of test results in ci --- .github/workflows/build_and_test.yml | 32 +++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 5bf3f978..98082eec 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -29,7 +29,7 @@ jobs: shell: pwsh run: | Invoke-Build -Task Clean, Build - - name: Upload + - name: Upload Artifact uses: actions/upload-artifact@v3 with: name: Release @@ -61,6 +61,12 @@ jobs: shell: powershell run: | Invoke-Build -Task Test + - name: Upload test results + uses: actions/upload-artifact@v3 + with: + name: ${{ runner.os }}-Unit-Tests + path: Test*.xml + if: ${{ always() }} test_on_windows_v7: name: Test Module on Windows (PS v7) @@ -88,6 +94,12 @@ jobs: shell: pwsh run: | Invoke-Build -Task Test + - name: Upload test results + uses: actions/upload-artifact@v3 + with: + name: ${{ runner.os }}-Unit-Tests + path: Test*.xml + if: ${{ always() }} test_on_ubuntu: name: Test Module on Ubuntu @@ -115,6 +127,12 @@ jobs: shell: pwsh run: | Invoke-Build -Task Test + - name: Upload test results + uses: actions/upload-artifact@v3 + with: + name: ${{ runner.os }}-Unit-Tests + path: Test*.xml + if: ${{ always() }} test_on_macos: name: Test Module on macOS @@ -142,6 +160,12 @@ jobs: shell: pwsh run: | Invoke-Build -Task Test + - name: Upload test results + uses: actions/upload-artifact@v3 + with: + name: ${{ runner.os }}-Unit-Tests + path: Test*.xml + if: ${{ always() }} test_against_cloud: env: @@ -174,3 +198,9 @@ jobs: run: | Invoke-Build -Task Test -Tag "Integration" -ExcludeTag "" if: ${{ env.JiraURI != '' }} + - name: Upload test results + uses: actions/upload-artifact@v3 + with: + name: ${{ runner.os }}-Unit-Tests + path: Test*.xml + if: ${{ always() }} From ba16484ec193cb0d073bad8b21c73cfbc575ad10 Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Wed, 21 Jun 2023 21:58:09 +0200 Subject: [PATCH 3/6] added yaml file settings --- .editorconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 978fdae1..66fda4b6 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,5 +8,8 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[*.md] +[*.{md,yml,yaml}] trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 From 118266260044d8f2108a898b69de48b1dd5c2243 Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Wed, 21 Jun 2023 22:06:08 +0200 Subject: [PATCH 4/6] added CODEOWNERS config for ci managers --- .github/CODEOWNERS | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7158ca64..42746821 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,8 @@ # https://help.github.com/articles/about-codeowners/ -* @atlassianps/maintainers @atlassianps/reviewers +* @atlassianps/maintainers @atlassianps/reviewers + +.github/workflows @atlassianps/ci-managers +Tools/ @atlassianps/ci-managers +JiraPS.build.ps1 @atlassianps/ci-managers +PPSScriptAnalyzerSettings.psd1 @atlassianps/ci-managers From 5c468ff12d8c7c86fb26e57d6f8757776194693e Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Thu, 22 Jun 2023 09:47:27 +0200 Subject: [PATCH 5/6] extracted reviewers group from CODEOWNERS --- .github/CODEOWNERS | 8 +++----- .github/workflows/pr_review.yml | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/pr_review.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 42746821..a98ac839 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,8 +1,6 @@ -# https://help.github.com/articles/about-codeowners/ - -* @atlassianps/maintainers @atlassianps/reviewers - .github/workflows @atlassianps/ci-managers -Tools/ @atlassianps/ci-managers JiraPS.build.ps1 @atlassianps/ci-managers PPSScriptAnalyzerSettings.psd1 @atlassianps/ci-managers +Tools/ @atlassianps/ci-managers + +* @atlassianps/maintainers diff --git a/.github/workflows/pr_review.yml b/.github/workflows/pr_review.yml new file mode 100644 index 00000000..41e85416 --- /dev/null +++ b/.github/workflows/pr_review.yml @@ -0,0 +1,16 @@ +name: Refine PRs + +on: + pull_request: + types: [opened] + +jobs: + label_issue: + runs-on: ubuntu-latest + steps: + - name: "Add default reviewers to PR" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_URL: ${{ github.event.pull_request.html_url }} + run: | + gh pr edit $PR --add-reviewer @atlassianps/reviewers From eed3e8a9749f8346848e02ec33bd9dab3cc13c46 Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Fri, 23 Jun 2023 10:12:33 +0200 Subject: [PATCH 6/6] fixed variable name --- .github/workflows/pr_review.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_review.yml b/.github/workflows/pr_review.yml index 41e85416..ac6f1beb 100644 --- a/.github/workflows/pr_review.yml +++ b/.github/workflows/pr_review.yml @@ -11,6 +11,6 @@ jobs: - name: "Add default reviewers to PR" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ISSUE_URL: ${{ github.event.pull_request.html_url }} + PR_URL: ${{ github.event.pull_request.html_url }} run: | - gh pr edit $PR --add-reviewer @atlassianps/reviewers + gh pr edit $PR_URL --add-reviewer @atlassianps/reviewers