Repository for common Github Actions used across the ApplauseAuto organization.
Available actions:
- mvn_java_setup
- allure_reporting
- allure_email
This action installs maven and java on your host machine.
java-version: specifies the java version to install (temurindistribution)- default:
17
- default:
mvn-version: specifies the maven version to install- default:
3.9.2
- default:
use-mvn-cache: specifies usage of maven cache, when available- default:
false
- default:
name: Your Workflow Name
on: push
jobs:
your-job-name:
runs-on: applauseauto-customer-auto-small-arm64
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ApplauseAuto/gha-shared/.github/actions/mvn_java_setup@v2
with:
java-version: 21
mvn-version: 3.9.2
use-mvn-cache: 'true'
- name: TestNG SDK tests
env:
apiKey: ${{ secrets.YOUR_SDK_API_KEY }}
run: |
mvn --no-transfer-progress test -Dexecution=clientSide -DdownloadResults=never \
-DsuiteFile=some-Test.xml \
-DdriverConfig=some-driver.json \
-DproductId=123This action performs Allure reporting tasks.
It generates reports from TestNG results, manages history and publishes to Github Pages
The pages-branch (default: gh-pages) must be precreated and marked as the github-pages branch for your repository.
To make this branch default github-pages for your repository:
- Go to your repository on github.com.
- Click repository
Settings - Click
Pagessubsection from left-side menu - In
GitHub Pages visibilitysection, mark asPrivate. This restricts the pages to users that have access to the repository. - In
Build and deploymentsection, marksource: Deploy from a branchandbranch: gh-pages / (root)
allure-history: The relative path to the folder, that will be published to Github Pages.- default:
allure-history
- default:
allure-history-size: the number of Allure report histories to maintain- default:
60
- default:
allure-reports: The relative path to the directory where Allure will write the generated report.- default:
allure-report
- default:
allure-results: The relative path to the directory where Allure will keep report artifacts.- default:
target/allure-results
- default:
-
allure-subfolder: The subdirectory where Allure will keep report artifacts for matrix runs.
pages-branch: The Github Pages branch (and relative path/directory) to publish- default:
gh-pages
- default:
add-summary: Adds Github Action Summary Step output- default:
true
- default:
github-token: The github token used for publishing to Github Pages.- required
- Note: This is NOT a Personal Access Token. This token is created automatically and is used for your workflow. See example for usage.
name: Your Workflow Name
on: push
jobs:
your-job-name:
runs-on: applauseauto-customer-auto-small-arm64
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ApplauseAuto/gha-shared/.github/actions/mvn_java_setup@v2
- name: TestNG SDK tests
env:
apiKey: ${{ secrets.YOUR_SDK_API_KEY }}
run: |
mvn --no-transfer-progress test -Dexecution=clientSide -DdownloadResults=never \
-DsuiteFile=some-Test.xml \
-DdriverConfig=some-driver.json \
-DproductId=123
- uses: ApplauseAuto/gha-shared/.github/actions/allure_reporting@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}This action sends email containing Allure report hyperlink when using the repository github-pages hosting.
The repository should be configured for github-pages hosting (recommended using the action allure_reporting)
This action only works when using Applause self-hosted runners.
recipients: CSV list of email recipients- default:
allure-history - notes: empty string will skip email sending
- default:
subject: add custom email subject- default: "repo-owner/repo-name Allure report date:time
- example:
ApplauseAuto/gha-trial Allure report 14/12/23T21:21
- example:
- default: "repo-owner/repo-name Allure report date:time
name: Your Workflow Name
on: push
jobs:
your-job-name:
runs-on: applauseauto-customer-auto-small-arm64
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ApplauseAuto/gha-shared/.github/actions/mvn_java_setup@v2
- name: TestNG SDK tests
env:
apiKey: ${{ secrets.YOUR_SDK_API_KEY }}
run: |
mvn --no-transfer-progress test -Dexecution=clientSide -DdownloadResults=never \
-DsuiteFile=some-Test.xml \
-DdriverConfig=some-driver.json \
-DproductId=123
- uses: ApplauseAuto/gha-shared/.github/actions/allure_reporting@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# configuring this as a separate job,
# depending on previous job eg: [needs: your-job-name]
# prevents duplicate emails when using matrix-driven tests, ensuring it only runs once at the end
deploy-job:
runs-on: applauseauto-customer-auto-small-arm64
needs: your-job-name
permissions:
contents: read
pages: write
id-token: write
steps:
- uses: ApplauseAuto/gha-shared/.github/actions/allure_deploy@v2
# configuring this as a separate job,
# depending on previous job eg: [needs: deploy-job]
# prevents duplicate emails when using matrix-driven tests, ensuring it only runs once at the end
email-job:
runs-on: applauseauto-customer-auto-small-arm64
needs: deploy-job
steps:
- uses: ApplauseAuto/gha-shared/.github/actions/allure_email@v2
with:
recipients: user1@applause.com, user2@applause.comThis action publishes the github pages branch to the hosted url.
The repository should be configured for github-pages hosting (recommended using the action allure_reporting)
pages_directory: The directory inside of the pages-branch that allure reports are deployed to'- default:
. - notes:
.publishes the entire
- default:
pages_branch: The branch published for github-pages.- default: gha-pages
page_url: URL to deployed GitHub Pages
name: Your Workflow Name
on: push
jobs:
your-job-name:
runs-on: applauseauto-customer-auto-small-arm64
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ApplauseAuto/gha-shared/.github/actions/mvn_java_setup@v2
- name: TestNG SDK tests
env:
apiKey: ${{ secrets.YOUR_SDK_API_KEY }}
run: |
mvn --no-transfer-progress test -Dexecution=clientSide -DdownloadResults=never \
-DsuiteFile=some-Test.xml \
-DdriverConfig=some-driver.json \
-DproductId=123
- uses: ApplauseAuto/gha-shared/.github/actions/allure_reporting@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# configuring this as a separate job,
# depending on previous job eg: [needs: your-job-name]
# prevents duplicate emails when using matrix-driven tests, ensuring it only runs once at the end
deploy-job:
runs-on: applauseauto-customer-auto-small-arm64
needs: your-job-name
permissions:
contents: read
pages: write
id-token: write
steps:
- uses: ApplauseAuto/gha-shared/.github/actions/allure_deploy@v2