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

Feature: caching improvements to ci #481

Merged
merged 6 commits into from
Jun 23, 2023
Merged
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
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
Loading