From a4f1de3ebb054e4e2b75c60d3f01bf6cf7fb573f Mon Sep 17 00:00:00 2001 From: piotradamczyk5 <65554637+piotradamczyk5@users.noreply.github.com> Date: Tue, 16 Mar 2021 10:15:38 +0100 Subject: [PATCH] docs: Create Github marketplace documentation for Flank action (#1701) Fixes #1600 This is the description of the Flank Github action which goes to the Github marketplace. Unfortunately, we could not point to custom documentation, so I have added a link to the main documentation --- README.md | 3 + .../store_documentation.md | 113 ++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 docs/flank-github-action/store_documentation.md diff --git a/README.md b/README.md index cabd583f82..0ec909e864 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,6 @@ Flank is a [massively parallel Android and iOS test runner](https://docs.google. Flank is YAML compatible with [the gcloud CLI](https://cloud.google.com/sdk/gcloud/reference/alpha/firebase/test). Flank provides extra features to accelerate velocity and increase quality. ### Documentation is at [flank.github.io/flank](https://flank.github.io/flank/) + + +### Github action documentation is at [repository](https://github.com/Flank/flank/blob/master/docs/flank-github-action/store_documentation.md) diff --git a/docs/flank-github-action/store_documentation.md b/docs/flank-github-action/store_documentation.md new file mode 100644 index 0000000000..81a8909bc6 --- /dev/null +++ b/docs/flank-github-action/store_documentation.md @@ -0,0 +1,113 @@ +## Action + +This Github action allows for running Flank as a Github workflow. + +Documentation for Flank is at [flank.github.io/flank](https://flank.github.io/flank/) + + +## Usage + +### Inputs + +| Input name | Description | Required | Default | +|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|------------------| +| `version` | Flank version to run. Minimal supported version is `v21.03.1`. Leaving it blank will fallback to latest version. | `false` | latest available | +| `service_account` | Service account to authenticate with. Could be path to file, link to file or file content itself. More information about creating a service account could be found at [documentation](https://flank.github.io/flank/#authenticate-with-a-service-account) | `true` | | +| `platform` | Platform to run. Could be `ios` or `android` | `true` | | +| `flank_configuration_file` | Flank configuration file. More information on how it should look like is in [documentation](https://flank.github.io/flank/#flank-configuration) | `true` | | + +### Outputs + +| Output name | Description | +|----------------------------|--------------------------------------------------------------------------------------------------------------------------| +| `gcloud_results_directory` | Link to Gcloud store where results are stored. | +| `local_results_directory` | Path to local results directory. All output files from this run are stored inside. You could use it as output artifacts. | + + +### Adding to workflows + +```yaml +- name: + id: + uses: Flank/flank@master + with: + version: + service_account: + platform: [android|ios] + flank_configuration_file: +``` + + +### Example workflows + +#### Service account file content from secrets +```yaml +- name: flank run + id: flank_run + uses: Flank/flank@master + with: + # Flank version to run + version: v21.03.1 + # Service account file content from secrets + service_account: ${{ secrets.SERVICE_ACCOUNT }} + # Run Android tests + platform: android + # Path to configuration file from local repo + flank_configuration_file: './testing/android/flank-simple-success.yml' + +- name: output + run: | + # Use local directory output + echo "Local directory: ${{ steps.flank_run.outputs.local_results_directory }}" + # Use Gcloud storage output + echo "Gcloud: ${{ steps.flank_run.outputs.gcloud_results_directory }}" +``` + +#### Service account file from repository +```yaml +- name: flank run + id: flank_run + uses: Flank/flank@master + with: + # Service account file from repository + service_account: './service_account.json' + # Run Android tests + platform: android + # Path to configuration file from local repo + flank_configuration_file: './testing/android/flank-simple-success.yml' + +- name: output + run: | + # Use local directory output + echo "Local directory: ${{ steps.flank_run.outputs.local_results_directory }}" + # Use Gcloud storage output + echo "Gcloud: ${{ steps.flank_run.outputs.gcloud_results_directory }}" +``` + +#### Create service account during workflow +```yaml + +- name: Create service account + run: echo '${{ secrets.SERVICE_ACCOUNT }}' > service_account_created.json + +- name: flank run + id: flank_run + uses: Flank/flank@master + with: + # Service account created in previous step + service_account: './service_account_created.json' + # Run Android tests + platform: android + # Path to configuration file from local repo + flank_configuration_file: './testing/android/flank-simple-success.yml' + +- name: output + run: | + # Use local directory output + echo "Local directory: ${{ steps.flank_run.outputs.local_results_directory }}" + # Use Gcloud storage output + echo "Gcloud: ${{ steps.flank_run.outputs.gcloud_results_directory }}" +``` + +## Runner OS support +All 3 runner operating systems are supported.