Skip to content

Commit 83ac69d

Browse files
authored
CI Improvements + Add RAT checks to the project (#222)
* Restrict to 1 job per ref. For pushes, only run on main * rat inclusion
1 parent 6c695a2 commit 83ac69d

File tree

123 files changed

+1810
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1810
-23
lines changed

.github/workflows/cdm-integrationtest.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
name: Build and test jar with integration tests
2-
on: [push, pull_request]
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
38
jobs:
49
CDM-Integration-Test:
5-
runs-on: ubuntu-latest
10+
concurrency:
11+
group: ${{ github.ref }}-${{ github.job }}-${{ matrix.jdk }}-${{ matrix.os }}
12+
cancel-in-progress: true
13+
strategy:
14+
matrix:
15+
jdk: [ 8 ]
16+
os: [ ubuntu-latest ]
17+
runs-on: ${{ matrix.os }}
618
steps:
719
- uses: actions/checkout@v3
820
- name: Set up JDK 8
921
uses: actions/setup-java@v3
1022
with:
11-
java-version: '8'
23+
java-version: ${{ matrix.jdk }}
1224
distribution: 'temurin'
1325
cache: maven
1426
- name: Test SIT with cdm

.github/workflows/maven.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,32 @@
88

99
name: Java CI with Maven
1010

11-
on: [push, pull_request]
11+
on:
12+
workflow_dispatch:
13+
pull_request:
14+
push:
15+
branches:
16+
- main
1217

1318
jobs:
1419
build:
20+
concurrency:
21+
group: ${{ github.ref }}-${{ github.job }}-${{ matrix.jdk }}-${{ matrix.os }}
22+
cancel-in-progress: true
1523

16-
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
jdk: [ 8 ]
27+
os: [ ubuntu-latest ]
28+
29+
runs-on: ${{ matrix.os }}
1730

1831
steps:
1932
- uses: actions/checkout@v3
2033
- name: Set up JDK 8
2134
uses: actions/setup-java@v3
2235
with:
23-
java-version: '8'
36+
java-version: ${{ matrix.jdk }}
2437
distribution: 'temurin'
2538
cache: maven
2639
- name: Build with Maven

.settings/org.eclipse.core.resources.prefs

Lines changed: 0 additions & 5 deletions
This file was deleted.

.settings/org.eclipse.jdt.core.prefs

Lines changed: 0 additions & 8 deletions
This file was deleted.

.settings/org.eclipse.m2e.core.prefs

Lines changed: 0 additions & 4 deletions
This file was deleted.

pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,22 @@
341341
</execution>
342342
</executions>
343343
</plugin>
344+
<plugin>
345+
<groupId>org.apache.rat</groupId>
346+
<artifactId>apache-rat-plugin</artifactId>
347+
<version>0.15</version>
348+
<configuration>
349+
<excludesFile>rat-excludes.txt</excludesFile>
350+
</configuration>
351+
<executions>
352+
<execution>
353+
<phase>verify</phase>
354+
<goals>
355+
<goal>check</goal>
356+
</goals>
357+
</execution>
358+
</executions>
359+
</plugin>
344360
</plugins>
345361
</build>
346362
</project>

rat-excludes.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.github/pull_request_template.md
2+
.github/workflows/cdm-integrationtest.yml
3+
.github/workflows/docker-publish.yml
4+
.github/workflows/docker-push-sha-commit.yml
5+
.github/workflows/maven-publish.yml
6+
.github/workflows/maven.yml
7+
.github/workflows/snyk-cli-scan.yml
8+
.github/workflows/snyk-pr-cleanup.yml
9+
README.md
10+
rat-excludes.txt
11+
pom.xml
12+
CODEOWNERS
13+
CODE_OF_CONDUCT.md
14+
CONTRIBUTING.md
15+
RELEASE.md
16+
LICENSE.md
17+
Dockerfile
18+
PERF/*
19+
SIT/*
20+
scripts/*
21+
test-backup/feature/*
22+
src/resources/partitions.csv
23+
src/resources/primary_key_rows.csv
24+
src/resources/log4j.xml
25+

scripts/bump_minor_version

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
#
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
#
14+
115
#!/bin/bash
216
set -x
317
CURRENT_VERSION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout)

scripts/get-latest-maven-version.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
#
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
#
14+
115
#!/bin/bash
216

317
MAVEN_BASE_VERSION=3.9

src/main/java/com/datastax/cdm/cql/EnhancedSession.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright DataStax, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://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+
*/
116
package com.datastax.cdm.cql;
217

318
import com.datastax.cdm.cql.statement.*;

0 commit comments

Comments
 (0)