Test new workflow #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dynamic Matrices | |
on: | |
push: | |
pull_request: | |
types: [ assigned, opened, synchronize, reopened, edited ] | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: Branch/tag/hash to use (defaults to master) | |
required: false | |
default: master | |
jobs: | |
description: Jobs to run (comma-separated, defaults to all) | |
required: false | |
jobs: | |
prepare: | |
name: Prepare Matrix | |
runs-on: ubuntu-latest | |
outputs: | |
unit-tests-matrix: ${{ steps.set-matrix.outputs.unit-tests-matrix }} | |
jira-it-matrix: ${{ steps.set-matrix.outputs.jira-it-matrix }} | |
confluence-it-matrix: ${{ steps.set-matrix.outputs.confluence-it-matrix }} | |
bitbucket-it-matrix: ${{ steps.set-matrix.outputs.bitbucket-it-matrix }} | |
skip-jira-its: ${{ steps.set-matrix.outputs.skip-jira-its }} | |
skip-bitbucket-its: ${{ steps.set-matrix.outputs.skip-bitbucket-its }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.ref }} | |
- id: set-matrix | |
run: bin/build/prepare-matrices.sh | |
run-tests: | |
name: Unit Tests | |
needs: prepare | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: ${{ fromJSON(needs.prepare.outputs.unit-tests-matrix) }} | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.ref }} | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: adopt | |
- run: bin/build/install-plugin-sdk.sh | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: maven-unit | |
- run: bin/build/override-plugin-sdk-maven.sh | |
- run: bin/build/run-unit-tests.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: unit-tests-coverage-java-${{ matrix.java-version }} | |
path: '**/target/site/jacoco/**' | |
integration-tests-jira: | |
name: Jira | |
needs: [prepare, run-tests] | |
if: (github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-jira')) && !needs.prepare.outputs.skip-jira-its | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 30 | |
strategy: | |
matrix: ${{ fromJSON(needs.prepare.outputs.jira-it-matrix) }} | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.ref }} | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: adopt | |
- run: bin/build/install-plugin-sdk.sh | |
- run: bin/build/override-plugin-sdk-maven.sh | |
- run: bin/build/install-int-test-libs.sh | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: maven-unit | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository/com/atlassian/jira | |
key: maven-integration-jira-${{ matrix.jira-version }} | |
- run: bin/build/install-common-modules.sh | |
- run: VERSION=${{ matrix.jira-version }} bin/build/run-jira-its.sh | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: webdriver-screenshots-jira-${{ matrix.jira-version }} | |
path: jira-slack-server-integration/jira-slack-server-integration-plugin/target/webdriverTests/** | |
integration-tests-confluence: | |
name: Confluence | |
needs: [prepare, run-tests] | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: ${{ fromJSON(needs.prepare.outputs.confluence-it-matrix) }} | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.ref }} | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: adopt | |
- run: bin/build/install-plugin-sdk.sh | |
- run: bin/build/override-plugin-sdk-maven.sh | |
- run: bin/build/install-int-test-libs.sh | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: maven-unit | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository/com/atlassian/confluence | |
key: maven-integration-confluence-${{ matrix.confluence-version }} | |
- run: bin/build/install-common-modules.sh | |
- run: VERSION=${{ matrix.confluence-version }} bin/build/run-confluence-its.sh | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: webdriver-screenshots-confluence-${{ matrix.confluence-version }}-java-${{ matrix.java-version }} | |
path: confluence-slack-server-integration-plugin/target/webdriverTests/** | |
integration-tests-bitbucket: | |
name: Bitbucket | |
needs: [prepare, run-tests] | |
if: (github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-bitbucket')) && !needs.prepare.outputs.skip-bitbucket-its | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 30 | |
strategy: | |
matrix: ${{ fromJSON(needs.prepare.outputs.bitbucket-it-matrix) }} | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.ref }} | |
# Dec 13, 2022 | |
# latest Bitbucket 8.6.1 doesn't support latest git 2.38.1 installed on the Ubuntu 20 image Github provides | |
# install last supported git - 2.37.4; remove this trick once Bitbucket implements support for latest git | |
# https://confluence.atlassian.com/bitbucketserver/supported-platforms-776640981.html#Supportedplatforms-dvcsDVCS | |
- run: bin/build/install-supported-git.sh | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: adopt | |
- run: bin/build/install-plugin-sdk.sh | |
- run: bin/build/override-plugin-sdk-maven.sh | |
- run: bin/build/install-int-test-libs.sh | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: maven-unit | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository/com/atlassian/bitbucket | |
key: maven-integration-bitbucket-${{ matrix.bitbucket-version }} | |
- run: bin/build/install-common-modules.sh | |
- run: VERSION=${{ matrix.bitbucket-version }} bin/build/run-bitbucket-its.sh | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: webdriver-screenshots-bitbucket-${{ matrix.bitbucket-version }}-java-${{ matrix.java-version }} | |
path: bitbucket-slack-server-integration-plugin/target/webdriverTests/** |