Skip to content

Commit 6580200

Browse files
chore: set up graalvm downstream checks to run showcase tests (#1215)
* chore: setup graalvm downstream checks to run showcase tests Co-authored-by: Burke Davison <[email protected]>
1 parent d13d3c3 commit 6580200

File tree

3 files changed

+58
-126
lines changed

3 files changed

+58
-126
lines changed

.github/workflows/downstream-native-image.yaml

+25-7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
# repositories than needed this downstream check for GraalVM native image
99
# compilation.
1010
name: downstream
11+
env:
12+
SHOWCASE_VERSION: 0.25.0
1113
jobs:
1214
# GraalVM job ensures the compatibility of GraaVM version
1315
graalvm:
@@ -17,9 +19,6 @@ jobs:
1719
matrix:
1820
graalvm: [22.3.0]
1921
java: [11, 17]
20-
repo:
21-
# GAPIC library that doesn't use a real GCP project in integration tests
22-
- orgpolicy
2322
steps:
2423
- uses: actions/checkout@v2
2524
- uses: stCarolas/setup-maven@v4
@@ -35,7 +34,26 @@ jobs:
3534
# Example: https://github.com/googleapis/testing-infra-docker/pull/195
3635
graalvm-version: ${{matrix.graalvm}}
3736
native-image: true
38-
- run: java -version
39-
- run: sudo apt-get update -y
40-
- run: sudo apt-get install libxml2-utils
41-
- run: .kokoro/downstream-client-library-check.sh ${{matrix.repo}} graalvm
37+
- name: Install maven modules
38+
run: |
39+
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
40+
- name: Install system dependencies
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y curl unzip
44+
- name: Install showcase server
45+
run: |
46+
sudo mkdir -p /usr/src/showcase
47+
sudo chown -R ${USER} /usr/src/
48+
curl --location https://github.com/googleapis/gapic-showcase/releases/download/v${SHOWCASE_VERSION}/gapic-showcase-${SHOWCASE_VERSION}-linux-amd64.tar.gz --output /usr/src/showcase/showcase-${SHOWCASE_VERSION}-linux-amd64.tar.gz
49+
cd /usr/src/showcase/
50+
tar -xf showcase-*
51+
./gapic-showcase run &
52+
cd -
53+
- name: Run Showcase tests with GraalVM
54+
working-directory: showcase
55+
run: |
56+
java -version
57+
sudo apt-get update -y
58+
sudo apt-get install libxml2-utils
59+
mvn test -Pnative,-showcase -Denforcer.skip=true -ntp -B

.kokoro/downstream-client-library-check.sh

-96
This file was deleted.

showcase/pom.xml

+33-23
Original file line numberDiff line numberDiff line change
@@ -63,27 +63,37 @@
6363
<module>proto-gapic-showcase-v1beta1</module>
6464
</modules>
6565

66-
<build>
67-
<plugins>
68-
<plugin>
69-
<groupId>org.apache.maven.plugins</groupId>
70-
<artifactId>maven-surefire-plugin</artifactId>
71-
<configuration>
72-
<skip>${skipUnitTests}</skip>
73-
</configuration>
74-
</plugin>
75-
<plugin>
76-
<groupId>org.apache.maven.plugins</groupId>
77-
<artifactId>maven-failsafe-plugin</artifactId>
78-
<configuration>
79-
<forkCount>1C</forkCount>
80-
<reuseForks>true</reuseForks>
81-
</configuration>
82-
</plugin>
83-
<plugin>
84-
<groupId>org.codehaus.mojo</groupId>
85-
<artifactId>flatten-maven-plugin</artifactId>
86-
</plugin>
87-
</plugins>
88-
</build>
66+
<profiles>
67+
<profile>
68+
<id>showcase</id>
69+
<activation>
70+
<activeByDefault>true</activeByDefault>
71+
</activation>
72+
<build>
73+
<plugins>
74+
<plugin>
75+
<groupId>org.apache.maven.plugins</groupId>
76+
<artifactId>maven-surefire-plugin</artifactId>
77+
<configuration>
78+
<skip>${skipUnitTests}</skip>
79+
</configuration>
80+
</plugin>
81+
<plugin>
82+
<groupId>org.apache.maven.plugins</groupId>
83+
<artifactId>maven-failsafe-plugin</artifactId>
84+
<configuration>
85+
<forkCount>1C</forkCount>
86+
<reuseForks>true</reuseForks>
87+
</configuration>
88+
</plugin>
89+
<plugin>
90+
<groupId>org.codehaus.mojo</groupId>
91+
<artifactId>flatten-maven-plugin</artifactId>
92+
</plugin>
93+
</plugins>
94+
</build>
95+
</profile>
96+
97+
</profiles>
98+
8999
</project>

0 commit comments

Comments
 (0)