Skip to content

Commit

Permalink
CI Improvements + Add RAT checks to the project (#222)
Browse files Browse the repository at this point in the history
* Restrict to 1 job per ref. For pushes, only run on main

* rat inclusion
  • Loading branch information
msmygit authored Dec 1, 2023
1 parent 6c695a2 commit 83ac69d
Show file tree
Hide file tree
Showing 123 changed files with 1,810 additions and 23 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/cdm-integrationtest.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
name: Build and test jar with integration tests
on: [push, pull_request]
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
CDM-Integration-Test:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}-${{ github.job }}-${{ matrix.jdk }}-${{ matrix.os }}
cancel-in-progress: true
strategy:
matrix:
jdk: [ 8 ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
cache: maven
- name: Test SIT with cdm
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,32 @@

name: Java CI with Maven

on: [push, pull_request]
on:
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
build:
concurrency:
group: ${{ github.ref }}-${{ github.job }}-${{ matrix.jdk }}-${{ matrix.os }}
cancel-in-progress: true

runs-on: ubuntu-latest
strategy:
matrix:
jdk: [ 8 ]
os: [ ubuntu-latest ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
cache: maven
- name: Build with Maven
Expand Down
5 changes: 0 additions & 5 deletions .settings/org.eclipse.core.resources.prefs

This file was deleted.

8 changes: 0 additions & 8 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

4 changes: 0 additions & 4 deletions .settings/org.eclipse.m2e.core.prefs

This file was deleted.

16 changes: 16 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,22 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.15</version>
<configuration>
<excludesFile>rat-excludes.txt</excludesFile>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
25 changes: 25 additions & 0 deletions rat-excludes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.github/pull_request_template.md
.github/workflows/cdm-integrationtest.yml
.github/workflows/docker-publish.yml
.github/workflows/docker-push-sha-commit.yml
.github/workflows/maven-publish.yml
.github/workflows/maven.yml
.github/workflows/snyk-cli-scan.yml
.github/workflows/snyk-pr-cleanup.yml
README.md
rat-excludes.txt
pom.xml
CODEOWNERS
CODE_OF_CONDUCT.md
CONTRIBUTING.md
RELEASE.md
LICENSE.md
Dockerfile
PERF/*
SIT/*
scripts/*
test-backup/feature/*
src/resources/partitions.csv
src/resources/primary_key_rows.csv
src/resources/log4j.xml

14 changes: 14 additions & 0 deletions scripts/bump_minor_version
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#!/bin/bash
set -x
CURRENT_VERSION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout)
Expand Down
14 changes: 14 additions & 0 deletions scripts/get-latest-maven-version.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#!/bin/bash

MAVEN_BASE_VERSION=3.9
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/datastax/cdm/cql/EnhancedSession.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.datastax.cdm.cql;

import com.datastax.cdm.cql.statement.*;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/datastax/cdm/cql/codec/AbstractBaseCodec.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.datastax.cdm.cql.codec;

import com.datastax.cdm.properties.PropertyHelper;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/datastax/cdm/cql/codec/BIGINT_StringCodec.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.datastax.cdm.cql.codec;

import com.datastax.oss.driver.api.core.ProtocolVersion;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/datastax/cdm/cql/codec/CodecFactory.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.datastax.cdm.cql.codec;

import com.datastax.cdm.properties.PropertyHelper;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/datastax/cdm/cql/codec/Codecset.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.datastax.cdm.cql.codec;

public enum Codecset {
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/datastax/cdm/cql/codec/DECIMAL_StringCodec.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.datastax.cdm.cql.codec;

import com.datastax.cdm.properties.PropertyHelper;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/datastax/cdm/cql/codec/DOUBLE_StringCodec.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.datastax.cdm.cql.codec;

import com.datastax.cdm.properties.PropertyHelper;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/datastax/cdm/cql/codec/INT_StringCodec.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.datastax.cdm.cql.codec;

import com.datastax.cdm.properties.PropertyHelper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.datastax.cdm.cql.codec;

import com.datastax.oss.driver.api.core.ProtocolVersion;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.datastax.cdm.cql.codec;

import com.datastax.oss.driver.api.core.ProtocolVersion;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/datastax/cdm/cql/codec/TEXT_BigDecimalCodec.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.datastax.cdm.cql.codec;

import com.datastax.oss.driver.api.core.ProtocolVersion;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/datastax/cdm/cql/codec/TEXT_DoubleCodec.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.datastax.cdm.cql.codec;

import com.datastax.oss.driver.api.core.ProtocolVersion;
Expand Down
Loading

0 comments on commit 83ac69d

Please sign in to comment.