-
Notifications
You must be signed in to change notification settings - Fork 1.1k
67 lines (58 loc) · 2.43 KB
/
pqc-tests.yml
File metadata and controls
67 lines (58 loc) · 2.43 KB
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
name: PQC Connectivity Integration Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
pqc-tests:
runs-on: ubuntu-latest
steps:
# 1. Checkout sibling HTTP Client repository
- name: Checkout google-http-java-client
uses: actions/checkout@v4
with:
repository: googleapis/google-http-java-client
ref: chore/pqc-poc-2
path: google-http-java-client
# 2. Checkout this monorepo
- name: Checkout google-cloud-java-pqc
uses: actions/checkout@v4
with:
path: google-cloud-java-pqc
# 3. Set up JDK 17
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
cache-dependency-path: 'google-cloud-java-pqc/pom.xml'
# 4. Build and install modified google-http-client SNAPSHOT locally
- name: Build and Install google-http-java-client
run: |
cd google-http-java-client
mvn clean install -DskipTests=true -Dcheckstyle.skip -Dclirr.skip -Denforcer.skip -Dfmt.skip
# 5. Build the entire monorepo core components required by the tests
- name: Build and Install Core Dependency Reactor
run: |
cd google-cloud-java-pqc
mvn clean install -pl sdk-platform-java/pqc-test/pqc-test-snapshot,sdk-platform-java/pqc-test/pqc-test-release -am -T 1.5C -Dcheckstyle.skip -Dclirr.skip -Denforcer.skip -Dfmt.skip -DskipTests=true
# 6. Run Snapshot PQC Tests (EXPECT PASS)
- name: Run Snapshot PQC Connectivity Tests (Expect PASS)
run: |
cd google-cloud-java-pqc/sdk-platform-java/pqc-test/pqc-test-snapshot
mvn install -Dcheckstyle.skip -Dclirr.skip -Denforcer.skip -Dfmt.skip -Dtest=RunPqcTest
# 7. Run Release PQC Tests (EXPECT FAIL)
- name: Run Release PQC Connectivity Tests (Expect FAIL)
# We expect this step to fail. If it passes, it means release libraries are negotiating PQC (which is incorrect).
# Thus we run it and assert that the maven command fails (exit code != 0).
run: |
cd google-cloud-java-pqc/sdk-platform-java/pqc-test/pqc-test-release
if mvn install -Dcheckstyle.skip -Dclirr.skip -Denforcer.skip -Dfmt.skip -Dtest=RunPqcTest; then
echo "Error: Release tests passed but they were expected to fail!"
exit 1
else
echo "Success: Release tests failed-fast as expected."
exit 0
fi