Skip to content

Commit eaf652e

Browse files
authored
chore: fix sample snippet tag to fix synth and update common templates (#75)
1 parent 2faceb0 commit eaf652e

File tree

7 files changed

+92
-5
lines changed

7 files changed

+92
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
name: ci
7+
jobs:
8+
units:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
java: [7, 8, 11]
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-java@v1
16+
with:
17+
java-version: ${{matrix.java}}
18+
- run: java -version
19+
- run: .kokoro/build.sh
20+
env:
21+
JOB_TYPE: test
22+
- name: coverage
23+
uses: codecov/codecov-action@v1
24+
with:
25+
name: actions ${{matrix.java}}
26+
windows:
27+
runs-on: windows-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-java@v1
31+
with:
32+
java-version: 8
33+
- run: java -version
34+
- run: .kokoro/build.bat
35+
env:
36+
JOB_TYPE: test
37+
dependencies:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v2
41+
- uses: actions/setup-java@v1
42+
with:
43+
java-version: 8
44+
- run: java -version
45+
- run: .kokoro/dependencies.sh
46+
linkage-monitor:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v2
50+
- uses: actions/setup-java@v1
51+
with:
52+
java-version: 8
53+
- run: java -version
54+
- run: .kokoro/linkage-monitor.sh
55+
lint:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v2
59+
- uses: actions/setup-java@v1
60+
with:
61+
java-version: 8
62+
- run: java -version
63+
- run: .kokoro/build.sh
64+
env:
65+
JOB_TYPE: lint
66+
clirr:
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v2
70+
- uses: actions/setup-java@v1
71+
with:
72+
java-version: 8
73+
- run: java -version
74+
- run: .kokoro/build.sh
75+
env:
76+
JOB_TYPE: clirr

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ hs_err_pid*
2424

2525
# intellij project folder
2626
.idea/
27+
*.iml
2728

2829
# maven build directory
2930
target/

.kokoro/build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
:: See documentation in type-shell-output.bat
22

3-
"C:\Program Files\Git\bin\bash.exe" github/java-pubsublite/.kokoro/build.sh
3+
"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh

CONTRIBUTING.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,16 @@ mvn -Penable-samples clean verify
9999
```
100100

101101
2. [Activate](#profile-activation) the profile.
102-
3. Define your samples in a normal Maven project in the `samples/` directory
102+
3. Define your samples in a normal Maven project in the `samples/` directory.
103+
104+
### Code Formatting
105+
106+
Code in this repo is formatted with
107+
[google-java-format](https://github.com/google/google-java-format).
108+
To run formatting on your project, you can run:
109+
```
110+
mvn com.coveo:fmt-maven-plugin:format
111+
```
103112

104113
### Profile Activation
105114

samples/snippets/src/main/java/pubsublite/DeleteTopicExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ public static void deleteTopicExample(
7272
throw statusException;
7373
}
7474
}
75-
} // [START pubsublite_delete_topic]
75+
} // [END pubsublite_delete_topic]

synth.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"git": {
55
"name": ".",
66
"remote": "[email protected]:googleapis/java-pubsublite.git",
7-
"sha": "579eaab949bf7e92ae3fc5c877fb3b7bb3370632"
7+
"sha": "2faceb03ec7c91c07b1353d74b244aa763140ab0"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "synthtool",
1313
"remote": "https://github.com/googleapis/synthtool.git",
14-
"sha": "01b6f23d24b27878b48667ce597876d66b59780e"
14+
"sha": "7ee92820e64c0aea379781b82399d6b3f3c8655f"
1515
}
1616
}
1717
]

synth.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
# TODO: generate library protos when publicly available
2020

2121
java.common_templates(excludes=[
22+
'.kokoro/*/samples.cfg',
2223
# TODO: allow README generation when public
2324
'README.md',
2425
# TODO: allow when pubsublite is available in libraries-bom

0 commit comments

Comments
 (0)