-
Notifications
You must be signed in to change notification settings - Fork 3
81 lines (74 loc) · 2.3 KB
/
maven.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Maestro2
on: [ workflow_dispatch, push, pull_request ]
env:
JAVA_VERSION: 11.0.3
SERVER_ID: snapshots
PYTHON_VERISON: '3.x'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/[email protected]
with:
java-version: ${{ env.JAVA_VERSION }}
- name: Maven Build
run: mvn -B package --file pom.xml -DskipTests
- name: Maven Test
run: mvn test
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERISON }}
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
cd external_tester
pip install -r requirements.txt
- name: CLI Test
timeout-minutes: 2
run: |
cd external_tester
python maestro_cli_test.py
- name: Web API Test
timeout-minutes: 2
run: |
cd external_tester
python webapi_test.py
- name: Legacy CLI Test
timeout-minutes: 2
run: |
cd external_tester
python cli_legacy_test.py
- name: Threaded Web API test
timeout-minutes: 5
run: |
cd external_tester
python test_simultaneous_simulations.py
deploy:
if: github.event_name == 'push' && (github.ref == 'refs/heads/development' )
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Environment variables
run: echo ${{ env.SERVER_ID }}
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
server-id: ${{ env.SERVER_ID }}
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Deploy
run: mvn -B -Prelease-sources-javadoc deploy
env:
MAVEN_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}