Skip to content

Commit 4467c66

Browse files
authored
AVRO-3009 Test in GitHub Actions (apache#1043)
* AVRO-3009 GitHub Actions * AVRO-3009: Rat Action * AVRO-3009: Ruby Matrix * AVRO-3009: Remove Unused Python Caching * AVRO-3009: Disable TravisCI
1 parent ca6d72d commit 4467c66

16 files changed

Lines changed: 1022 additions & 112 deletions

.github/workflows/rat.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: 'Rat'
17+
on:
18+
workflow_dispatch:
19+
push:
20+
branches: [ master ]
21+
pull_request:
22+
branches: [ master ]
23+
24+
jobs:
25+
rat:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v2
29+
30+
- name: Cache Local Maven Repository
31+
uses: actions/cache@v2
32+
with:
33+
path: ~/.m2/repository
34+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
35+
restore-keys: |
36+
${{ runner.os }}-maven-
37+
38+
- name: Setup Java
39+
uses: actions/setup-java@v1
40+
with:
41+
java-version: '11'
42+
43+
- name: Run Rat
44+
run: mvn test -Dmaven.main.skip=true -Dmaven.test.skip=true -DskipTests=true -P rat -pl :avro-toplevel
Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/bin/bash
2-
31
# Licensed to the Apache Software Foundation (ASF) under one or more
42
# contributor license agreements. See the NOTICE file distributed with
53
# this work for additional information regarding copyright ownership.
@@ -15,20 +13,32 @@
1513
# See the License for the specific language governing permissions and
1614
# limitations under the License.
1715

18-
set -e
16+
name: Test C++
17+
18+
on:
19+
workflow_dispatch:
20+
push:
21+
branches: [ master ]
22+
pull_request:
23+
branches: [ master ]
24+
paths:
25+
- 'lang/c\+\+/**'
26+
27+
defaults:
28+
run:
29+
working-directory: lang/c++
30+
31+
jobs:
32+
test:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
37+
- name: Install Dependencies
38+
run: sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev
39+
40+
- name: Lint
41+
run: ./build.sh lint
1942

20-
case "$TRAVIS_OS_NAME" in
21-
"linux")
22-
# Workaround for Yetus. For now, Yetus assumes the directory in which Dockerfile is placed is the docker context.
23-
# So the Dockerfile should be here to refer to other subdirectories than share/docker from inside the Dockerfile.
24-
cp share/docker/Dockerfile .
25-
/tmp/apache-yetus-0.10.0/bin/test-patch --plugins=buildtest --java-home=/usr/local/openjdk-"${JAVA}" --user-plugins=share/precommit/ --run-tests --empty-patch --docker --dockerfile=Dockerfile --dirty-workspace
26-
;;
27-
"windows")
28-
./lang/csharp/build.sh test
29-
;;
30-
*)
31-
echo "Invalid PLATFORM"
32-
exit 1
33-
;;
34-
esac
43+
- name: Test
44+
run: ./build.sh test

.github/workflows/test-lang-c.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: Test C
17+
18+
on:
19+
workflow_dispatch:
20+
push:
21+
branches: [ master ]
22+
pull_request:
23+
branches: [ master ]
24+
paths:
25+
- lang/c/**
26+
27+
defaults:
28+
run:
29+
working-directory: lang/c
30+
31+
jobs:
32+
test:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
37+
- name: Install Dependencies
38+
run: sudo apt-get install -qqy libjansson-dev libsnappy-dev
39+
40+
- name: Lint
41+
run: ./build.sh lint
42+
43+
- name: Test
44+
run: ./build.sh test
45+
46+
- name: Cache Local Maven Repository
47+
uses: actions/cache@v2
48+
with:
49+
path: ~/.m2/repository
50+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
51+
restore-keys: |
52+
${{ runner.os }}-maven-
53+
54+
- name: Install Java Avro for Interop Test
55+
working-directory: .
56+
run: mvn -B install -DskipTests
57+
58+
- name: Create Interop Data Directory
59+
working-directory: .
60+
run: mkdir -p build/interop/data
61+
62+
- name: Generate Interop Resources
63+
working-directory: lang/java/avro
64+
run: mvn -B -P interop-data-generate generate-resources
65+
66+
- name: Generate Interop Data
67+
run: ./build.sh interop-data-generate
68+
69+
- name: Run Interop Tests
70+
run: ./build.sh interop-data-test
71+
72+
interop:
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/checkout@v2
76+
77+
- name: Install Dependencies
78+
run: |
79+
sudo apt-get install -qqy --no-install-recommends libbz2-dev \
80+
libjansson-dev \
81+
liblzma-dev \
82+
libsnappy-dev \
83+
libzstd-dev
84+
85+
- name: Cache Local Maven Repository
86+
uses: actions/cache@v2
87+
with:
88+
path: ~/.m2/repository
89+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
90+
restore-keys: |
91+
${{ runner.os }}-maven-
92+
93+
- name: Install Java Avro for Interop Test
94+
working-directory: .
95+
run: mvn -B install -DskipTests
96+
97+
- name: Create Interop Data Directory
98+
working-directory: .
99+
run: mkdir -p build/interop/data
100+
101+
- name: Generate Interop Resources
102+
working-directory: lang/java/avro
103+
run: mvn -B -P interop-data-generate generate-resources
104+
105+
- name: Generate Interop Data
106+
run: ./build.sh interop-data-generate
107+
108+
- name: Run Interop Tests
109+
run: ./build.sh interop-data-test
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: 'Test C#'
17+
18+
on:
19+
workflow_dispatch:
20+
push:
21+
branches: [ master ]
22+
pull_request:
23+
branches: [ master ]
24+
paths:
25+
- lang/csharp/**
26+
27+
defaults:
28+
run:
29+
working-directory: lang/csharp
30+
31+
jobs:
32+
test:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
37+
- uses: actions/cache@v2
38+
with:
39+
path: ~/.nuget/packages
40+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
41+
restore-keys: |
42+
${{ runner.os }}-nuget-
43+
44+
- name: Lint
45+
run: ./build.sh lint
46+
47+
- name: Test
48+
run: ./build.sh test
49+
50+
interop:
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v2
54+
55+
- name: Cache Local Maven Repository
56+
uses: actions/cache@v2
57+
with:
58+
path: ~/.m2/repository
59+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
60+
restore-keys: |
61+
${{ runner.os }}-maven-
62+
63+
- name: Install Java Avro for Interop Test
64+
working-directory: .
65+
run: mvn -B install -DskipTests
66+
67+
- name: Create Interop Data Directory
68+
working-directory: .
69+
run: mkdir -p build/interop/data
70+
71+
- name: Generate Interop Resources
72+
working-directory: lang/java/avro
73+
run: mvn -B -P interop-data-generate generate-resources
74+
75+
- name: Generate Interop Data
76+
run: ./build.sh interop-data-generate
77+
78+
- name: Run Interop Tests
79+
run: ./build.sh interop-data-test
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: 'Test Java'
17+
on:
18+
workflow_dispatch:
19+
push:
20+
branches: [ master ]
21+
pull_request:
22+
branches: [ master ]
23+
paths:
24+
- lang/java/**
25+
26+
defaults:
27+
run:
28+
working-directory: lang/java
29+
30+
jobs:
31+
test:
32+
name: Java ${{ matrix.java }} Test
33+
runs-on: ubuntu-latest
34+
strategy:
35+
matrix:
36+
java:
37+
- '8'
38+
- '11'
39+
steps:
40+
- uses: actions/checkout@v2
41+
42+
- name: Cache Local Maven Repository
43+
uses: actions/cache@v2
44+
with:
45+
path: ~/.m2/repository
46+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
47+
restore-keys: |
48+
${{ runner.os }}-maven-
49+
50+
- name: Setup Java
51+
uses: actions/setup-java@v1
52+
with:
53+
java-version: ${{ matrix.java }}
54+
55+
- name: Lint
56+
run: ./build.sh lint
57+
58+
- name: Test
59+
run: ./build.sh test
60+
61+
interop:
62+
name: Java ${{ matrix.java }} Interop
63+
runs-on: ubuntu-latest
64+
strategy:
65+
matrix:
66+
java:
67+
- '8'
68+
- '11'
69+
steps:
70+
- uses: actions/checkout@v2
71+
72+
- name: Cache Local Maven Repository
73+
uses: actions/cache@v2
74+
with:
75+
path: ~/.m2/repository
76+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
77+
restore-keys: |
78+
${{ runner.os }}-maven-
79+
80+
- name: Setup Java
81+
uses: actions/setup-java@v1
82+
with:
83+
java-version: ${{ matrix.java }}
84+
85+
- name: Install Java Avro for Interop Test
86+
working-directory: .
87+
run: mvn -B install -DskipTests
88+
89+
- name: Create Interop Data Directory
90+
working-directory: .
91+
run: mkdir -p build/interop/data
92+
93+
- name: Generate Interop Resources
94+
working-directory: lang/java/avro
95+
run: mvn -B -P interop-data-generate generate-resources
96+
97+
- name: Run Interop Tests
98+
working-directory: lang/java/ipc
99+
run: mvn -B test -P interop-data-test

0 commit comments

Comments
 (0)