Skip to content

Commit

Permalink
feat: TEST using copy to s3 composable action
Browse files Browse the repository at this point in the history
In go-test workflow
  • Loading branch information
CallumNZ committed Oct 15, 2024
1 parent 12c9a58 commit a029531
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/reusable-go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ on:
type: string
description: |
extra args to pass `go test`
aws-role-arn-to-assume:
type: string
required: false
description: |
role to use to upload test results to s3 bucket,
see reusable-copy-to-s3 workflow for more detail.
s3-bucket:
type: string
required: false
description: |
the AWS S3 bucket name to upload test results to.
jobs:
go-test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -39,7 +50,7 @@ jobs:
id: coverage-html
run: |
go tool cover -html=/tmp/coverage.out -o /tmp/coverage.html
- name: Upload test log
- name: Upload test log to GitHub Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: always()
with:
Expand All @@ -50,3 +61,11 @@ jobs:
if-no-files-found: error
retention-days: 1
overwrite: true
- name: Upload test log to S3
uses: GeoNet/Actions/.github/actions/copy-to-s3@caS3
if: ${{ inputs.aws-role-arn-to-assume && inputs.s3-bucket }}
with:
aws-role-arn-to-assume: ${{ inputs.aws-role-arn-to-assume }}
artifact-name: test-results
artifact-path: ./coverage
s3-bucket: s3://${{inputs.s3-bucket}}/test-coverage-results/${{github.repository}}/go/

0 comments on commit a029531

Please sign in to comment.