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

PLPT-564 Use zip-upload-artifact composite action instead of upload-artifact #236

Merged
merged 2 commits into from
Sep 26, 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
28 changes: 7 additions & 21 deletions workflow-templates/im-build-dotnet-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workflow Code: LoathsomeSnipe_v47 DO NOT REMOVE
# Workflow Code: LoathsomeSnipe_v48 DO NOT REMOVE
# Purpose:
# Automatically checks out the code, builds, run tests and creates artifacts
# which are uploaded to a GH release when commits are pushed to a PR. In the
Expand Down Expand Up @@ -340,19 +340,12 @@ jobs:
line-threshold: 0
branch-threshold: 0

- name: Pre-Zip Code Coverage Artifacts
# GitHub zips whatever we upload but they charge based on the pre-zip size.
# The artifact will be double-zipped when downloaded but we will save on storage costs.
- name: zip and upload dotnet code coverage report
if: always() && steps.dotnet_coverage_check.outcome == 'success' && env.IS_DEPENDABOT_PR == 'false'
shell: pwsh
run: Compress-Archive -Path ./${{ env.CODE_COVERAGE_DIR_DOTNET }}/* -DestinationPath "./${{ env.CODE_COVERAGE_DIR_DOTNET }}/${{ env.CODE_COVERAGE_REPORT_NAME_DOTNET }}.zip"

- name: upload dotnet code coverage report
if: always() && steps.dotnet_coverage_check.outcome == 'success' && env.IS_DEPENDABOT_PR == 'false'
uses: actions/upload-artifact@v3
uses: im-open/[email protected]
with:
name: ${{ env.CODE_COVERAGE_REPORT_NAME_DOTNET }}
path: ${{ env.CODE_COVERAGE_DIR_DOTNET }}/${{ env.CODE_COVERAGE_REPORT_NAME_DOTNET }}.zip
path: ${{ env.CODE_COVERAGE_DIR_DOTNET }}
retention-days: 15 # Cannot exceed 30 days.

# TODO: Remove this job if you do not have jest tests
Expand Down Expand Up @@ -458,19 +451,12 @@ jobs:
line-threshold: 0
branch-threshold: 0

- name: Pre-Zip Code Coverage Artifacts
# GitHub zips whatever we upload but they charge based on the pre-zip size.
# The artifact will be double-zipped when downloaded but we will save on storage costs.
if: always() && steps.jest_coverage_check.outcome == 'success' && env.IS_DEPENDABOT_PR == 'false'
shell: pwsh
run: Compress-Archive -Path ./${{ env.CODE_COVERAGE_DIR_JEST }}/* -DestinationPath "./${{ env.CODE_COVERAGE_DIR_JEST }}/${{ env.CODE_COVERAGE_REPORT_NAME_JEST }}.zip"

- name: upload jest code coverage report
- name: zip and upload jest code coverage report
if: always() && steps.jest_coverage_check.outcome == 'success' && env.IS_DEPENDABOT_PR == 'false'
uses: actions/upload-artifact@v3
uses: im-open/zip-upload-artifact@v1.1.5
with:
name: ${{ env.CODE_COVERAGE_REPORT_NAME_JEST }}
path: ${{ env.CODE_COVERAGE_DIR_JEST }}/${{ env.CODE_COVERAGE_REPORT_NAME_JEST }}.zip
path: ${{ env.CODE_COVERAGE_DIR_JEST }}
retention-days: 15 # Cannot exceed 30 days.

build-deployment-artifacts:
Expand Down
15 changes: 4 additions & 11 deletions workflow-templates/im-build-nuget-package.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workflow Code: TrustingCockroach_v38 DO NOT REMOVE
# Workflow Code: TrustingCockroach_v39 DO NOT REMOVE
# Purpose:
# Automatically builds the project and runs tests with code coverage. If
# everything is green, a new semantic version is calculated and a new package
Expand Down Expand Up @@ -161,19 +161,12 @@ jobs:
line-threshold: 0
branch-threshold: 0

- name: Pre-Zip Code Coverage Artifacts
# GitHub zips whatever we upload but they charge based on the pre-zip size.
# The artifact will be double-zipped when downloaded but we will save on storage costs.
- name: zip and upload dotnet code coverage report
if: always() && steps.dotnet_coverage_check.outcome == 'success' && env.IS_DEPENDABOT_PR == 'false'
shell: pwsh
run: Compress-Archive -Path ./${{ env.CODE_COVERAGE_DIR_DOTNET }}/* -DestinationPath "./${{ env.CODE_COVERAGE_DIR_DOTNET }}/${{ env.CODE_COVERAGE_REPORT_NAME_DOTNET }}.zip"

- name: upload dotnet code coverage report
if: always() && steps.dotnet_coverage_check.outcome == 'success' && env.IS_DEPENDABOT_PR == 'false'
uses: actions/upload-artifact@v3
uses: im-open/[email protected]
with:
name: ${{ env.CODE_COVERAGE_REPORT_NAME_DOTNET }}
path: ${{ env.CODE_COVERAGE_DIR_DOTNET }}/${{ env.CODE_COVERAGE_REPORT_NAME_DOTNET }}.zip
path: ${{ env.CODE_COVERAGE_DIR_DOTNET }}
retention-days: 15 # Cannot exceed 30 days.

- name: Check for Test Failures
Expand Down