Skip to content

Commit

Permalink
chore: Initial workflow for running functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rsenden committed Jul 12, 2023
1 parent 8d36aa4 commit e26c5b3
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/functional-tests.yml
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 ;;

0 comments on commit e26c5b3

Please sign in to comment.