Skip to content

Commit

Permalink
Merge pull request #481 from AtlassianPS/feature/caching_improvements…
Browse files Browse the repository at this point in the history
…_to_ci

Feature: caching improvements to ci
  • Loading branch information
lipkau authored Jun 23, 2023
2 parents 4efd012 + eed3e8a commit 109dc34
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 5 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# https://help.github.com/articles/about-codeowners/
.github/workflows @atlassianps/ci-managers
JiraPS.build.ps1 @atlassianps/ci-managers
PPSScriptAnalyzerSettings.psd1 @atlassianps/ci-managers
Tools/ @atlassianps/ci-managers

* @atlassianps/maintainers @atlassianps/reviewers
* @atlassianps/maintainers
68 changes: 67 additions & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -23,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
Expand All @@ -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: |
Expand All @@ -49,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)
Expand All @@ -61,6 +79,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: |
Expand All @@ -70,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
Expand All @@ -82,6 +112,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: |
Expand All @@ -91,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
Expand All @@ -103,6 +145,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: |
Expand All @@ -112,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:
Expand All @@ -128,6 +182,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: |
Expand All @@ -138,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() }}
16 changes: 16 additions & 0 deletions .github/workflows/pr_review.yml
Original file line number Diff line number Diff line change
@@ -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 }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
gh pr edit $PR_URL --add-reviewer @atlassianps/reviewers

0 comments on commit 109dc34

Please sign in to comment.