Skip to content

Commit

Permalink
Merge branch 'release/4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
straumat committed Feb 22, 2021
2 parents af58bd7 + e8bf336 commit cd8d56d
Show file tree
Hide file tree
Showing 248 changed files with 12,728 additions and 9,440 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patreon: straumat
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Pull Request Template

## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
- This change requires a documentation update

## How has this been tested

Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 1
target-branch: development
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
languages: java

- name: Set up JDK 11
- name: JDK 11 Setup
uses: actions/setup-java@v1
with:
java-version: 11.0.x
Expand Down
93 changes: 69 additions & 24 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@ jobs:

steps:
# ================================================================================================================
- name: Setup GPG
- name: GPG Setup
id: gpg
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
echo "$GPG_PRIVATE_KEY" > private.asc
gpg --import --batch private.asc
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

# ================================================================================================================
- name: Retrieve the sources
uses: actions/checkout@v1
# ================================================================================================================
- name: Set up JDK 11
- name: JDK 11 Setup
id: jdk
uses: actions/setup-java@v1
with:
java-version: 11.0.x
Expand All @@ -34,31 +32,78 @@ jobs:
server-password: MAVEN_PASSWORD

# ================================================================================================================
- name: Build, run tests, package and deploy to Maven central
- name: Retrieve the sources
id: sources
uses: actions/checkout@v1

# ================================================================================================================
- name: Retrieve the version
id: version
run: |
echo "::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
# ================================================================================================================
- name: Get Qase cases list
id: qase-list
run: |
echo "::set-output name=qase_cases_id::$( \
curl -s "https://api.qase.io/v1/case/CTB?limit=100" \
-H "Token: ${{ secrets.QASE_TOKEN }}" \
-H "Content-type: application/json" \
| jq -r -c '[.result.entities[].id | tostring] | join(",")')"
# ================================================================================================================
- name: Creates a Qase run
id: qase
run: |
echo "::set-output name=qase_run_id::$( \
curl -s "https://api.qase.io/v1/run/CTB" \
-X POST \
-H "Token: ${{ secrets.QASE_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{"title": "${{ github.event.head_commit.message }}","description": "Test run for ${{ steps.version.outputs.version }}","environment_id": null,"cases": [${{ steps.qase-list.outputs.qase_cases_id }}]}' \
| jq -r -c ".result.id")"
# ================================================================================================================
- name: Build, run tests, package and deploy to Maven central - Also sends Qase tests reports
id: package
env: # Environment variables.
# Ossrh credentials.
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
# GPG.
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
# Kucoin credentials.
KUCOIN_NAME: ${{ secrets.KUCOIN_NAME }}
KUCOIN_USERNAME: ${{ secrets.KUCOIN_USERNAME }}
KUCOIN_PASSPHRASE: ${{ secrets.KUCOIN_PASSPHRASE }}
KUCOIN_KEY: ${{ secrets.KUCOIN_KEY }}
KUCOIN_SECRET: ${{ secrets.KUCOIN_SECRET }}
# OSSRH credentials.
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: |
mvn deploy -B -Dgpg.passphrase=${GPG_PASSPHRASE}
echo "::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
mvn deploy -B -Dgpg.passphrase=${GPG_PASSPHRASE} \
-Dqase.enable=true \
-Dqase.project.code=CTB \
-Dqase.run.id=${{ steps.qase.outputs.qase_run_id }} \
-Dqase.api.token=${{ secrets.QASE_TOKEN }}
# ================================================================================================================
- name : Test Cassandre trading bot maven archetype - basic strategy
- name: Test Cassandre trading bot maven archetype - basic strategy
id: cassandre-trading-bot-spring-boot-starter-basic-archetype
run: |
mvn -B archetype:generate -DarchetypeGroupId=tech.cassandre.trading.bot -DarchetypeArtifactId=cassandre-trading-bot-spring-boot-starter-basic-archetype -DarchetypeVersion=${{ steps.package.outputs.version }} -DgroupId=com.example -DartifactId=archetype-test-basic -Dversion=1.0-SNAPSHOT -Dpackage=com.example
mvn -B archetype:generate \
-DarchetypeGroupId=tech.cassandre.trading.bot \
-DarchetypeArtifactId=cassandre-trading-bot-spring-boot-starter-basic-archetype \
-DarchetypeVersion=${{ steps.version.outputs.version }} \
-DgroupId=com.example \
-DartifactId=archetype-test-basic \
-Dversion=1.0-SNAPSHOT \
-Dpackage=com.example
mvn -f archetype-test-basic/pom.xml test
# ================================================================================================================
- name : Test Cassandre trading bot maven archetype - basic ta4j strategy
- name: Test Cassandre trading bot maven archetype - basic ta4j strategy
id: cassandre-trading-bot-spring-boot-starter-basic-ta4j-archetype
run: |
mvn -B archetype:generate -DarchetypeGroupId=tech.cassandre.trading.bot -DarchetypeArtifactId=cassandre-trading-bot-spring-boot-starter-basic-ta4j-archetype -DarchetypeVersion=${{ steps.package.outputs.version }} -DgroupId=com.example -DartifactId=archetype-test-ta4j-basic -Dversion=1.0-SNAPSHOT -Dpackage=com.example
mvn -B archetype:generate \
-DarchetypeGroupId=tech.cassandre.trading.bot \
-DarchetypeArtifactId=cassandre-trading-bot-spring-boot-starter-basic-ta4j-archetype \
-DarchetypeVersion=${{ steps.version.outputs.version }} \
-DgroupId=com.example \
-DartifactId=archetype-test-ta4j-basic \
-Dversion=1.0-SNAPSHOT \
-Dpackage=com.example
mvn -f archetype-test-ta4j-basic/pom.xml test
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v1

# ================================================================================================================
- name: Set up JDK 11
- name: JDK 11 Setup
uses: actions/setup-java@v1
with:
java-version: 11.0.x
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/release-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
# ================================================================================================================
- name: Setup GPG
- name: GPG Setup
run: |
echo "$GPG_PRIVATE_KEY" > private.asc
gpg --import --batch private.asc
Expand All @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v1

# ================================================================================================================
- name: Set up JDK 11
- name: JDK 11 Setup
uses: actions/setup-java@v1
with:
java-version: 11.0.x
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
asset_content_type: application/java-archive

# ================================================================================================================
- name : Publish the release announce on Twitter
- name: Publish the release announce on Twitter
uses: ethomson/send-tweet-action@v1
env:
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
Expand All @@ -117,3 +117,11 @@ jobs:
consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

# ================================================================================================================
- name: Publish the release announce on Discord
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: "Cassandre trading bot ${{ steps.package.outputs.version }} released - More information here : ${{ steps.create_release.outputs.html_url }}"
2 changes: 1 addition & 1 deletion .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Xmx1024m -Xms1024m -Djava.awt.headless=true
-Xmx1024m -Xms1024m -Djava.awt.headless=true --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/javax.crypto=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED
50 changes: 27 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
<h3 align="center">
<a href="https://hexagonkt.com">
<img alt="Cassandre trading bot" src="https://github.com/cassandre-tech/cassandre-trading-bot-web-site/blob/master/.gitbook/assets/logo_with_text.png?raw=true" />
</a>
<br>
Cassandre trading bot
<a href="https://trading-bot.cassandre.tech">
<img src="https://github.com/cassandre-tech/cassandre-trading-bot-web-site/blob/master/.gitbook/assets/logo_with_text.png?raw=true"
alt="Cassandre trading bot"/>
</a>
<br>
Cassandre trading bot
</h3>

<p align="center">Cassandre makes it easy to create and run a Java crypto trading bot</p>

<p align="center">
<a href="https://github.com/cassandre-tech/cassandre-trading-bot/actions">
<img
src="https://github.com/cassandre-tech/cassandre-trading-bot/workflows/Continuous%20integration/badge.svg"
alt="GitHub Actions" />
</a>
<a href="https://discord.gg/sv3VXuTgFS">
<img src="https://img.shields.io/discord/796141274171310110.svg?logo=discord&label=Discord"
alt="Discord conversation" />
</a>
</p>

<p align="center">
<a href="https://www.codacy.com/gh/cassandre-tech/cassandre-trading-bot?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=cassandre-tech/cassandre-trading-bot&amp;utm_campaign=Badge_Grade">
<img
src="https://api.codacy.com/project/badge/Grade/f26dc41008a64bb18dcd404b46b69fc8"
alt="Codacy" />
</a>
<a href="https://search.maven.org/search?q=g:tech.cassandre.trading.bot">
<img
src="https://img.shields.io/maven-central/v/tech.cassandre.trading.bot/cassandre-trading-bot-project.svg?label=Maven%20Central"
alt="Maven Central Repository" />
</a>
<a href="https://github.com/cassandre-tech/cassandre-trading-bot/actions">
<img src="https://github.com/cassandre-tech/cassandre-trading-bot/workflows/Continuous%20integration/badge.svg"
alt="GitHub Actions" />
</a>
<a href="https://www.codacy.com/gh/cassandre-tech/cassandre-trading-bot?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=cassandre-tech/cassandre-trading-bot&amp;utm_campaign=Badge_Grade">
<img src="https://api.codacy.com/project/badge/Grade/f26dc41008a64bb18dcd404b46b69fc8"
alt="Codacy" />
</a>
<a href="https://search.maven.org/search?q=g:tech.cassandre.trading.bot">
<img src="https://img.shields.io/maven-central/v/tech.cassandre.trading.bot/cassandre-trading-bot-project.svg?label=Maven%20Central"
alt="Maven Central Repository" />
</a>
</p>

<p align="center">
<a href="https://trading-bot.cassandre.tech/">Web site</a> |
<a href="https://trading-bot.cassandre.tech/learn/quickstart">Quick Start</a> |
<a href="mailto:[email protected]">Contact us</a>
<a href="https://trading-bot.cassandre.tech/">Web site</a> |
<a href="https://trading-bot.cassandre.tech/learn/quickstart">Quick Start</a> |
<a href="https://twitter.com/cassandretech">Twitter</a> |
<a href="mailto:[email protected]">Contact us</a>
</p>
5 changes: 3 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

| Version | Supported |
| ------- | ------------------ |
| 3.x.x | :white_check_mark: |
| 2.x.x | :white_check_mark: |
| 4.x.x | :white_check_mark: |
| 3.x.x | :x: |
| 2.x.x | :x: |
| 1.x.x | :x: |

## Reporting a Vulnerability
Expand Down
6 changes: 4 additions & 2 deletions checkstyle_configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="tokens"
value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND,WILDCARD_TYPE"/>
value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/>
</module>
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
Expand All @@ -68,7 +68,9 @@
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>
<module name="VisibilityModifier">
<property name="protectedAllowed" value="true"/>
</module>
<module name="ArrayTypeStyle"/>
<module name="FinalParameters"/>
<module name="TodoComment">
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- Project information -->
<groupId>tech.cassandre.trading.bot</groupId>
<artifactId>cassandre-trading-bot-project</artifactId>
<version>3.0.0</version>
<version>4.0.0</version>
<packaging>pom</packaging>
<name>Cassandre trading bot</name>
<url>https://github.com/cassandre-tech/cassandre-trading-bot</url>
Expand Down Expand Up @@ -36,7 +36,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.4.RELEASE</version>
<version>2.4.2</version>
<relativePath/>
</parent>
<!-- =========================================================================================================== -->
Expand Down Expand Up @@ -76,7 +76,7 @@
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.14.0</version>
<version>1.15.1</version>
<configuration>
<gitFlowConfig>
<developmentBranch>development</developmentBranch>
Expand Down Expand Up @@ -113,7 +113,7 @@
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<phase>deploy</phase>
<goals>
<goal>sign</goal>
</goals>
Expand Down
Loading

0 comments on commit cd8d56d

Please sign in to comment.