Skip to content

Commit e2f3896

Browse files
committed
improved readme
1 parent 3a32828 commit e2f3896

1 file changed

Lines changed: 33 additions & 10 deletions

File tree

README.md

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,46 @@
1-
# setup-apama GitHub Action
1+
# GitHub Action setup-apama
22
This GitHub action installs Apama Community Edition on either Windows or Linux.
33

4-
The environment variables are configured as if the `apama_env` script had been run/sourced.
4+
The environment variables for the workflow are configured as if the `apama_env` script had been run/sourced.
5+
This means that subsequent steps can use Apama executables such as `engine_deploy` and `apamadoc`.
56

6-
This means subsequent steps can use Apama executables such as `engine_deploy` and `apamadoc`.
7-
The bin directories from the JDK and Python installation included with Apama are also added to PATH.
7+
If you wish to test on both Windows and Linux, you can use a Bash shell or PowerShell to execute Apama tools on both
8+
operating systems. Since the executable for running PySys tests has different extensions on Windows/Linux, this action
9+
sets an additional `APAMA_PYSYS` environment variable containing the script name so you can run it with
10+
`$APAMA_PYSYS run <args>` in your shell script.
811

9-
If you wish to test on both Windows and Linux, you can use a bash shell to execute Apama tools on both operating systems.
10-
Since the executable for running PySys tests has different extensions on Windows/Linux, this action sets an additional
11-
`APAMA_PYSYS` environment variable containing the script name so you can add `$APAMA_PYSYS run <params here>` to your
12-
shell script.
12+
The action has only one input parameter, `apama-version`, which must be set to a valid 4-digit Apama version.
1313

1414
It is recommended to use this action with a cache to avoid downloading and running the Apama installer every time
1515
the job executes. To do this, add the following after your checkout action and before setup-apama:
1616

17+
env:
18+
# The 4-digit version to download from http://www.apamacommunity.com/downloads/
19+
SETUP_APAMA_VERSION: 10.5.3.2
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
1724
- name: Cached Apama installation
1825
# always-upload is a fork of actions/cache allows cache to be saved even if some later steps (e.g. testing) fail
1926
uses: pat-s/always-upload-cache@v2.1.3
27+
28+
id: cache-apama-installer
2029
with:
21-
# TODO: keep this version matching the Apama version you wish to use
22-
key: apama-${{ runner.os }}-10.5.3.2
2330
path: ~/cached-apama-installation.tar
31+
key: apama-${{ runner.os }}-${{ env.SETUP_APAMA_VERSION }}
32+
33+
- uses: setup-apama@v1
34+
with:
35+
apama-version: ${{ env.SETUP_APAMA_VERSION }}
36+
37+
- name: Run PySys tests
38+
shell: bash
39+
run: |
40+
echo APAMA_HOME is: $APAMA_HOME
41+
$APAMA_PYSYS run --mode=ALL --threads=auto --purge
42+
43+
Note that the Linux environment usually executes quite a lot faster than the Windows one, so if you don't need
44+
multi-platform testing, use a workflow that runs only on Linux for maximum efficiency.
45+
46+
See https://github.com/ApamaCommunity for a complete sample workflow using this action.

0 commit comments

Comments
 (0)