-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Initial workflow for running functional tests
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Fortify CLI Functional Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 2 * * *' | ||
|
||
jobs: | ||
functional-test: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
type: [java, jar, native] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
# Check out source code to access the Gradle-based functional tests | ||
- name: Check Out Source Code | ||
uses: actions/checkout@v2 | ||
with: | ||
# TODO Update this to 'develop' once merged' | ||
ref: feat-functest | ||
|
||
# Java is required to run the Gradle-based functional tests and | ||
# for running the Java version of fcli | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: Run Tests | ||
shell: bash | ||
run: | | ||
case "${{ matrix.type }}" in | ||
"java" ) | ||
./gradlew ftest ;; | ||
"jar" ) | ||
./gradlew build | ||
./gradlew ftest -Dft.fcli=build/libs/fcli.jar ;; | ||
"native" ) | ||
case "${{ matrix.os }}" in | ||
"ubuntu-latest" ) | ||
curl url -fsSL -o - https://github.com/fortify-ps/fcli/releases/download/dev_develop/fcli-linux.tgz | tar -zxvf - | ||
./gradlew ftest -Dft.fcli=./fcli ;; | ||
"windows-latest" ) | ||
curl url -fsSL -o - https://github.com/fortify-ps/fcli/releases/download/dev_develop/fcli-windows.zip | 7z e -si | ||
./gradlew ftest -Dft.fcli=./fcli.exe ;; | ||
"macos-latest" ) | ||
curl url -fsSL -o - https://github.com/fortify-ps/fcli/releases/download/dev_develop/fcli-mac.tgz | tar -zxvf - | ||
./gradlew ftest -Dft.fcli=./fcli ;; | ||
esac ;; | ||