Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create cli_script_check.yml #77

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions .github/workflows/cli_script_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Workflow to build and check cli_scripts in Linux and Windows

name: Check mta-cli scripts


on:
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:

# build_windup job
build_windup:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
with:
repository: windup/windup
path: windup
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
java-package: jdk
- name: Cache Maven packages
uses: actions/[email protected]
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build on JDK 8 skipping tests
run:
mvn -B clean install -DskipTests
working-directory: windup

# build_windup_rulesets job
build_windup_rulesets:
runs-on: ubuntu-latest
needs: build_windup

steps:
- uses: actions/[email protected]
with:
repository: windup/windup-rulesets
path: windup-rulesets
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
java-package: jdk
- name: Cache Maven packages
uses: actions/[email protected]
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build on JDK 8
run: mvn -B clean install -DskipTests
working-directory: windup-rulesets

# build_cli job
build_cli:
runs-on: ubuntu-latest
needs: [build_windup, build_windup_rulesets]

steps:
- uses: actions/[email protected]
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
java-package: jdk
- name: Cache Maven packages
uses: actions/[email protected]
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build on JDK 8
run: mvn -B clean install
- name: upload mta-cli zip
uses: actions/upload-artifact@v2
with:
name: mta-cli-zip
path: target/*.zip
retention-days: 5

# "linux-script-check" job
linux-script-check:
runs-on: ubuntu-latest
needs: build_cli

steps:

- name: Download mta-cli-zip
uses: actions/download-artifact@v2
with:
name: mta-cli-zip

- name: unzip and run mta-cli
run: |
unzip mta-cli*offline.zip
cd mta-cli*/bin
./mta-cli discoverTargets

# "windows-script-check" job
windows-script-check:
runs-on: windows-latest
needs: [build_cli, linux-script-check]

steps:

- name: Download mta-cli-zip
uses: actions/download-artifact@v2
with:
name: mta-cli-zip

- name: unzip and run mta-cli
run: |
unzip mta-cli*offline.zip
cd mta-cli*
cd bin
cmd.exe mta-cli.bat discoverTargets