-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
10e7a22
commit 907500d
Showing
3 changed files
with
64 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,30 @@ | ||
name: SonarCloud | ||
name: Render Spring POC hook example | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build and analyze | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: "zulu" # Alternative distribution options are available. | ||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v3 | ||
uses: actions/setup-java@v2 | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
- name: Cache Maven packages | ||
uses: actions/cache@v3 | ||
java-version: "17" | ||
distribution: "adopt" | ||
|
||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
- name: Build and analyze // | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=fozboom_book-library-java | ||
tasks: build | ||
java-home: ${{ env.JAVA_HOME_17_X64 }} | ||
publish-atoms: false | ||
|
||
- name: Trigger Render deploy hook | ||
run: curl ${{secrets.RENDER_DEPLOY_HOOK}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,47 @@ | ||
create table city ( | ||
id bigint not null, | ||
country varchar(255), | ||
country_code varchar(255), | ||
name varchar(255), | ||
region varchar(255), | ||
region_name varchar(255), | ||
zip varchar(255), | ||
primary key (id) | ||
CREATE SEQUENCE city_sequence START 1 INCREMENT 1; | ||
CREATE SEQUENCE ipinfo_sequence START 1 INCREMENT 1; | ||
CREATE SEQUENCE position_sequence START 1 INCREMENT 1; | ||
CREATE SEQUENCE provider_sequence START 1 INCREMENT 1; | ||
|
||
CREATE TABLE city ( | ||
id BIGINT PRIMARY KEY DEFAULT nextval('city_sequence'), | ||
country VARCHAR(255) NOT NULL, | ||
country_code VARCHAR(2) NOT NULL, | ||
region VARCHAR(255) NOT NULL, | ||
region_name VARCHAR(255) NOT NULL, | ||
name VARCHAR(255) NOT NULL, | ||
zip VARCHAR(255) NOT NULL | ||
); | ||
create table city_provider_relation ( | ||
city_id bigint not null, | ||
provider_id bigint not null, | ||
primary key (city_id, provider_id) | ||
|
||
CREATE TABLE position ( | ||
id BIGINT PRIMARY KEY DEFAULT nextval('position_sequence'), | ||
latitude NUMERIC(10, 8) NOT NULL, | ||
longitude NUMERIC(11, 8) NOT NULL | ||
); | ||
|
||
create table ip_info ( | ||
city_id bigint, | ||
id bigint not null, | ||
position_id bigint, | ||
provider_id bigint, | ||
ip varchar(255), | ||
time_zone varchar(255), | ||
primary key (id) | ||
|
||
CREATE TABLE provider ( | ||
id BIGINT PRIMARY KEY DEFAULT nextval('provider_sequence'), | ||
internet_service_provider VARCHAR(255) NOT NULL, | ||
organisation VARCHAR(255) NOT NULL, | ||
autonomous_system_name VARCHAR(255) NOT NULL | ||
); | ||
|
||
create table position ( | ||
latitude float(53), | ||
longitude float(53), | ||
id bigint not null, | ||
primary key (id) | ||
|
||
CREATE TABLE city_provider_relation ( | ||
provider_id BIGINT NOT NULL, | ||
city_id BIGINT NOT NULL, | ||
PRIMARY KEY (provider_id, city_id), | ||
FOREIGN KEY (provider_id) REFERENCES provider(id), | ||
FOREIGN KEY (city_id) REFERENCES city(id) | ||
); | ||
|
||
create table provider ( | ||
id bigint not null, | ||
autonomous_system_name varchar(255), | ||
internet_service_provider varchar(255), | ||
organisation varchar(255), | ||
primary key (id) | ||
|
||
CREATE TABLE ip_info ( | ||
id BIGINT PRIMARY KEY DEFAULT nextval('ipinfo_sequence'), | ||
city_id BIGINT NOT NULL, | ||
position_id BIGINT NOT NULL, | ||
time_zone VARCHAR(255) NOT NULL, | ||
provider_id BIGINT NOT NULL, | ||
ip VARCHAR(255) NOT NULL, | ||
FOREIGN KEY (city_id) REFERENCES city(id), | ||
FOREIGN KEY (position_id) REFERENCES position(id), | ||
FOREIGN KEY (provider_id) REFERENCES provider(id) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters