-
Notifications
You must be signed in to change notification settings - Fork 4
81 lines (70 loc) · 2.27 KB
/
generate-automation-project.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
name: generate automation and build
on:
workflow_call:
inputs:
archetype-version:
required: true
type: string
jobs:
generate-automation-project:
name: ${{ matrix.os }} generate and test tutorials
runs-on: ${{ matrix.os }}
environment: development
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
steps:
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: setup maven for sonatype snapshots
uses: whelk-io/maven-settings-xml-action@v20
with:
repositories: >
[
{
"id": "ossrh",
"url": "https://s01.oss.sonatype.org/content/repositories/snapshots",
"snapshots": {
"enabled": "true",
"checksumPolicy": "warn"
}
}
]
# FIXME should run with controlled java version
- name: bootstrap maven
uses: aahmed-se/setup-maven@v3
with:
maven-version: 3.6.1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: setup maven cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: generate testing project
shell: bash
run: |
mvn --batch-mode archetype:generate \
-DarchetypeGroupId=dev.aherscu.qa \
-DarchetypeArtifactId=qa-testing-archetype \
-DarchetypeVersion=${{ inputs.archetype-version }} \
-DgroupId=com.acme \
-DartifactId=testing \
-Dversion=1.0-SNAPSHOT \
-Dpackage=com.acme.testing
- name: build standalone testing project
shell: bash
run: |
cd testing && chmod +x mvnw && ./mvnw package -Pgenerate-standalone
- name: run standalone testing project
shell: bash
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_PASSWORD: ${{ secrets.SAUCELABS_PASSWORD }}
run: |
cd testing && chmod +x standalone-tutorials.sh && ./standalone-tutorials.sh