Skip to content

Commit

Permalink
Merge branch 'release/5.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
straumat committed Aug 5, 2021
2 parents 16ccf8e + 35fe9cb commit e2e8c6f
Show file tree
Hide file tree
Showing 226 changed files with 1,043 additions and 1,014 deletions.
28 changes: 28 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,31 @@ updates:
timezone: Europe/Paris
open-pull-requests-limit: 10
target-branch: development
- package-ecosystem: maven
directory: "trading-bot-archetypes/basic-archetype/src/main/resources/archetype-resources"
schedule:
interval: "weekly"
day: "friday"
time: "18:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
target-branch: development
- package-ecosystem: maven
directory: "trading-bot-archetypes/basic-ta4j-archetype/src/main/resources/archetype-resources"
schedule:
interval: "weekly"
day: "friday"
time: "18:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
target-branch: development

- package-ecosystem: "npm"
directory: "/docs"
schedule:
interval: "weekly"
day: "friday"
time: "18:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
target-branch: development
20 changes: 8 additions & 12 deletions .github/workflows/branch-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,28 @@ jobs:
steps:
# ================================================================================================================
- name: JDK 11 Setup
id: jdk
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'

# ================================================================================================================
- name: Retrieve the sources
id: sources
uses: actions/checkout@v1
uses: actions/checkout@v2

# ================================================================================================================
- name: Retrieve the version
id: version
- name: Build, run tests, package and deploy to Maven central
run: |
echo "::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
mvn install -Dgpg.skip
# ================================================================================================================
- name: Build, run tests, package and deploy to Maven central
id: package
- name: Retrieve the version from Maven pom
id: version
run: |
mvn install -Dgpg.skip
echo "::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
# ================================================================================================================
- 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 \
Expand All @@ -53,7 +50,6 @@ jobs:
# ================================================================================================================
- 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 \
Expand Down
57 changes: 28 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,35 @@ on:

jobs:
analyze:
# ==================================================================================================================
# Configuration.
name: Analyze
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: java

- name: JDK 11 Setup
uses: actions/setup-java@v1
with:
java-version: '11'

- name: Build, run tests, package and deploy to Maven central
run: |
mvn package
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
# ================================================================================================================
- name: JDK 11 Setup
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'

# ================================================================================================================
- name: Retrieve the sources
uses: actions/checkout@v2

# ================================================================================================================
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/[email protected]
with:
languages: java

# ================================================================================================================
- name: Build, run tests and package
run: |
mvn package
# ================================================================================================================
- name: Perform CodeQL Analysis
uses: github/codeql-action/[email protected]
30 changes: 16 additions & 14 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
steps:
# ================================================================================================================
- name: GPG Setup
id: gpg
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
Expand All @@ -23,28 +22,20 @@ jobs:
# ================================================================================================================
- name: JDK 11 Setup
id: jdk
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

# ================================================================================================================
- 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)"
uses: actions/checkout@v2

# ================================================================================================================
- name: Build, run tests, package and deploy to Maven central
id: package
env: # Environment variables.
# GPG.
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
Expand All @@ -54,9 +45,21 @@ jobs:
run: |
mvn deploy -B -Dgpg.passphrase=${GPG_PASSPHRASE}
# ================================================================================================================
- name: Upload codacy coverage results
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
--project-token ${{ secrets.CODACY_API_TOKEN }} \
-r spring-boot-starter/autoconfigure/target/site/jacoco/jacoco.xml
# ================================================================================================================
- name: Retrieve the version from Maven pom
id: version
run: |
echo "::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
# ================================================================================================================
- 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 \
Expand All @@ -70,7 +73,6 @@ jobs:
# ================================================================================================================
- 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 \
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ jobs:
runs-on: ubuntu-latest

steps:
# ================================================================================================================
- name: Retrieve the sources
uses: actions/checkout@v1

# ================================================================================================================
- name: JDK 11 Setup
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'

# ================================================================================================================
- name: Retrieve the sources
uses: actions/checkout@v2

# ================================================================================================================
- name: Build, run tests, package and deploy to Maven central - Also sends Qase tests reports
env: # Environment variables.
Expand Down Expand Up @@ -49,4 +50,4 @@ jobs:
BINANCE_KEY: ${{ secrets.BINANCE_KEY }}
BINANCE_SECRET: ${{ secrets.BINANCE_SECRET }}
run: |
mvn -Pintegration package
mvn -Pintegration package
19 changes: 9 additions & 10 deletions .github/workflows/release-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,28 @@ jobs:
steps:
# ================================================================================================================
- name: GPG Setup
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: JDK 11 Setup
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

# ================================================================================================================
- name: Retrieve the sources
uses: actions/checkout@v1
uses: actions/checkout@v2

# ================================================================================================================
- name: Build, run tests, package and deploy
- name: Build, package and deploy
id: package
env: # Environment variables.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -50,13 +51,12 @@ jobs:
# ================================================================================================================
- name: Build Changelog
id: build_changelog
uses: heinrichreimer/github-changelog-generator-action@v2.1.1
uses: heinrichreimer/github-changelog-generator-action@v2.2
with:
token: ${{ secrets.GITHUB_TOKEN }}

# ================================================================================================================
- name: Create the release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -142,7 +142,6 @@ jobs:

# ================================================================================================================
- name: Change release in website sources
id: sed
run: find . -type f -name "*.md" -exec sed -i 's/CASSANDRE_LATEST_RELEASE/${{ steps.getLatestRelease.outputs.release }}/g' {} \;

# ================================================================================================================
Expand All @@ -156,9 +155,9 @@ jobs:
# ================================================================================================================
- name: Deploy the documentation website
uses: JamesIves/[email protected].0
uses: JamesIves/[email protected].4
with:
branch: gh-pages
folder: docs/src/.vuepress/dist
commit-message: "Documentation website update"
clean: true
clean: true
6 changes: 2 additions & 4 deletions .github/workflows/website-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:
steps:
# ================================================================================================================
- name: Retrieve the sources
id: sources
uses: actions/checkout@v1
uses: actions/checkout@v2

# ================================================================================================================
- uses: pozetroninc/github-action-get-latest-release@master
Expand All @@ -25,7 +24,6 @@ jobs:

# ================================================================================================================
- name: Change release in website sources
id: sed
run: find . -type f -name "*.md" -exec sed -i 's/CASSANDRE_LATEST_RELEASE/${{ steps.getLatestRelease.outputs.release }}/g' {} \;

# ================================================================================================================
Expand All @@ -39,7 +37,7 @@ jobs:
# ================================================================================================================
- name: Deploy the documentation website
uses: JamesIves/[email protected].0
uses: JamesIves/[email protected].4
with:
branch: gh-pages
folder: docs/src/.vuepress/dist
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| Version | Supported |
| ------- | ------------------ |
| 5.x.x | :white_check_mark: |
| 4.x.x | :white_check_mark: |
| 4.x.x | :x: |
| 3.x.x | :x: |
| 2.x.x | :x: |
| 1.x.x | :x: |
Expand Down
3 changes: 1 addition & 2 deletions docs/src/learn/dry-mode-and-backtesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,9 @@ curl -s "https://api.kucoin.com/api/v1/market/candles?type=1day&symbol=BTC-USDT&

It will create a file named `tickers-btc-usdt.tsv` that contains the historical rate of BTC-USDT from `startDate` (3 months ago) to `endDate` (now). Of course, you can choose your own dates and currency pair.

Place this file in the `src/test/resources` folder of your project and add those lines to your JUnit test class:
Place this file in the `src/test/resources` folder of your project and add this line to your JUnit test class:

```java
@ComponentScan("tech.cassandre.trading.bot")
@Import(TickerFluxMock.class)
```

Expand Down
3 changes: 1 addition & 2 deletions docs/src/learn/technical-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,9 @@ curl -s "https://api.kucoin.com/api/v1/market/candles?type=1day&symbol=BTC-USDT&

It will create a file named `tickers-btc-usdt.tsv` that contains the historical rate of `btc-usdt` from `startDate` (3 months ago) to `endDate` (now). Of course, you can change dates and currency pair.

Now place this file in the `src/test/resources` folder of our project and add those lines to your JUnit test class:
Now place this file in the `src/test/resources` folder of our project and add this line to your JUnit test class:

```java
@ComponentScan("tech.cassandre.trading.bot")
@Import(TickerFluxMock.class)
```

Expand Down
Loading

0 comments on commit e2e8c6f

Please sign in to comment.