-
Notifications
You must be signed in to change notification settings - Fork 99
89 lines (87 loc) · 3.99 KB
/
jgiven_examples_build.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
82
83
84
85
86
87
88
name: "Test published JGiven"
on: [push, pull_request]
jobs:
validate_example_projects_work:
name: Test that the examples are actually working
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Android SDK
uses: android-actions/[email protected]
- name: Produce a local release with version 1.1-t
run: source scripts/local_release_with_version.sh
- name: Test Kotlin Example Project
run: >
source scripts/source_files/helper_functions.sh
&& runGradleTestOnGivenProject example-projects/kotlin/build.gradle 1.1-t
- name: Test JUnit5 Example Project
run: >
sudo apt-get install firefox
&& source scripts/source_files/helper_functions.sh
&& runGradleTestOnGivenProject example-projects/junit5/build.gradle 1.1-t
- name: Test Selenium Example Project
run: >
source scripts/source_files/helper_functions.sh
&& runGradleTestOnGivenProject example-projects/selenium/build.gradle 1.1-t
- name: Test Spock Example Project
run: >
source scripts/source_files/helper_functions.sh
&& runGradleTestOnGivenProject example-projects/spock/build.gradle 1.1-t
- name: Test Spring-Boot Example Project
run: >
source scripts/source_files/helper_functions.sh
&& runGradleTestOnGivenProject example-projects/spring-boot/build.gradle 1.1-t
- name: Test Maven Example Project
run: >
source scripts/source_files/helper_functions.sh
&& runMavenTestOnGivenProject example-projects/maven/pom.xml 1.1-t
- name: Upload test results html files
continue-on-error: true
if: ${{failure()}}
uses: actions/[email protected]
with:
name: test-report-example-projects
path: /home/runner/work/JGiven/JGiven/example-projects/*/build/reports/tests
if-no-files-found: ignore
- name: Test Java 17 Project
run: source scripts/source_files/helper_functions.sh && runMavenTestOnGivenProject example-projects/java17/pom.xml 1.1-t
- name: Test TestNG Example Project
run: source scripts/source_files/helper_functions.sh && runGradleTestOnGivenProject example-projects/testng/build.gradle 1.1-t
- name: Test Scala Example Project
run: |
sudo apt-get update
sudo apt-get install apt-transport-https curl gnupg -yqq
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo -H gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import
sudo chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg
sudo apt-get update
sudo apt-get install sbt
source scripts/source_files/helper_functions.sh && runScalaTest
- name: Upload test results html files
continue-on-error: true
if: ${{failure()}}
uses: actions/[email protected]
with:
name: test-report-example-projects
path: /home/runner/work/JGiven/JGiven/example-projects/*/build/reports/tests
if-no-files-found: ignore
validate_publication_poms:
name: Validate the format of the published poms
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'adopt'
- name: Load the bash script
run: scripts/local_release_with_version.sh
- name: Run validation
run: scripts/validate_poms.sh