woocommerce/.github/actions/tests/upload-allure-files-to-bucket/action.yml

53 lines
1.8 KiB
YAML
Raw Normal View History

2023-03-16 00:09:58 +00:00
name: Upload Allure files to bucket
description: Upload Allure files to bucket.
permissions: {}
inputs:
destination-dir:
description: Directory under the "artifacts" S3 folder to which the Allure files would be uploaded.
required: true
aws-region:
required: true
aws-access-key-id:
required: true
aws-secret-access-key:
required: true
s3-bucket:
required: true
include-allure-results:
2023-03-16 05:38:29 +00:00
dafault: false
2023-03-16 00:09:58 +00:00
runs:
using: composite
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-region: ${{ inputs.aws-region }}
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
2023-03-17 07:41:06 +00:00
- name: Verify allure-results and allure-report paths
uses: actions/github-script@v6
with:
script: |
const script = require('./.github/actions/tests/upload-allure-files-to-bucket/scripts/verify-allure-dirs.js')
script({core})
2023-03-16 00:09:58 +00:00
- name: Upload 'allure-results' folder
if: inputs.include-allure-results == true
shell: bash
2023-03-17 07:41:06 +00:00
working-directory: .github/actions/tests/upload-allure-files-to-bucket/scripts
run: bash upload-allure-results.sh
env:
DESTINATION_DIR: ${{ inputs.destination-dir }}
S3_BUCKET: ${{ inputs.s3-bucket }}
2023-03-16 00:09:58 +00:00
- name: Upload 'allure-report' folder
shell: bash
2023-03-17 07:41:06 +00:00
working-directory: .github/actions/tests/upload-allure-files-to-bucket/scripts
run: bash upload-allure-report.sh
env:
DESTINATION_DIR: ${{ inputs.destination-dir }}
S3_BUCKET: ${{ inputs.s3-bucket }}