Skip to content

Commit

Permalink
Merge pull request #47 from SamuelGuillemet/develop
Browse files Browse the repository at this point in the history
🔖 Bump version to 0.4.0
  • Loading branch information
SamuelGuillemet committed Feb 9, 2024
2 parents 081d3a8 + 3a8fe79 commit f05da31
Show file tree
Hide file tree
Showing 516 changed files with 45,977 additions and 8,559 deletions.
25 changes: 13 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2

updates:
- package-ecosystem: "github-actions"
target-branch: "develop"
Expand All @@ -29,15 +30,15 @@ updates:
patterns:
- "*"

# - package-ecosystem: "pip"
# target-branch: "develop"
# directory: "/components/pre-processing"
# schedule:
# interval: "weekly"
# commit-message:
# prefix: ⬆
# groups:
# production-dependencies:
# dependency-type: production
# development-dependencies:
# dependency-type: development
- package-ecosystem: "pip"
target-branch: "develop"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix:
groups:
production-dependencies:
dependency-type: production
development-dependencies:
dependency-type: development
41 changes: 16 additions & 25 deletions .github/workflows/ci-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,29 @@ on:
jobs:
main:
runs-on: ubuntu-latest
strategy:
matrix:
java-version:
- "17"
project:
- market-matcher
- order-book
- order-stream
- quickfix-server
- trade-stream
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
java-version: "17"
java-version: ${{ matrix.java-version }}
distribution: "temurin"
cache: "gradle"
# Cache node_modules
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Set shas
uses: nrwl/nx-set-shas@v4

- name: Get main branch
# Verify the event is a pull request and the base branch is not main
if: github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'main'
# This line is needed for nx affected to work when CI is running on a PR
run: git branch --track main origin/main

- name: Clean gradle cache
run: ./gradlew clean --no-daemon

- name: Verify formatting
run: npx nx format:check --exclude='*,!tag:lang:java'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3

- name: Test Java projects
run: npx nx affected -t build --parallel=3 --exclude='*,!tag:lang:java'
- name: Build Java project
run: ./gradlew :components:${{ matrix.project }}:build
41 changes: 41 additions & 0 deletions .github/workflows/ci-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI - Node

on:
push:
branches:
- develop
- main
pull_request:

jobs:
main:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
project:
- "components/website-frontend"

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache-dependency-path: ${{ matrix.project }}/package-lock.json
cache: "npm"

- name: Install dependencies
run: cd ${{ matrix.project }}; npm ci

- name: Verify lint
run: cd ${{ matrix.project }}; npm run lint

- name: Verify format
run: cd ${{ matrix.project }}; npm run format -- -c

- name: Test
run: cd ${{ matrix.project }}; npm test
46 changes: 15 additions & 31 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11, 3.12]
java-version: ["17"]
node-version: [20]
parameters:
- base_dir: "components"
project: "pre-processing"
# - base_dir: "clients"
# project: "quickfix-client"
python-version: ["3.10", "3.11", "3.12"]
project:
- "components/pre-processing"
- "components/website-backend"
- "clients/quickfix-client"

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -29,35 +27,21 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: "temurin"
cache: "gradle"
- name: Store poetry.lock path
id: poetry-path
run: echo "path=./${{ matrix.project }}/poetry.lock" >> $GITHUB_OUTPUT

- name: Install poetry
uses: abatilo/actions-poetry@v3

# Cache node_modules
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Verify formatting
run: npx nx format:check --exclude='*,!tag:lang:python'

- name: Define a cache for the virtual environment based on the dependencies lock file for ${{ matrix.parameters.project }}
uses: actions/cache@v3
- name: Define a cache for the virtual environment based on the dependencies lock file for ${{ matrix.project }}
uses: actions/cache@v4
with:
path: ./${{ matrix.parameters.base_dir }}/${{ matrix.parameters.project }}/.venv
key: venv-${{matrix.parameters.project}}-${{ hashFiles('./${{ matrix.parameters.base_dir }}/${{ matrix.parameters.project }}/poetry.lock') }}
path: ./${{ matrix.project }}/.venv
key: venv-${{ matrix.project }}-${{ hashFiles(steps.poetry-path.outputs.path) }}

- name: Install Dependencies
run: cd ./${{ matrix.parameters.base_dir }}/${{ matrix.parameters.project }} && poetry install
run: cd ./${{ matrix.project }}; poetry install

- name: Test
run: npx nx run-many -t lint,test,build --projects=${{ matrix.parameters.project }}
run: cd ./${{ matrix.project }}; poetry run pytest tests/
87 changes: 0 additions & 87 deletions .github/workflows/codeql.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: pre-commit

on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- uses: pre-commit/action@v3.0.0
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
dist
tmp
/out-tsc
quickfix_client_database.db

# dependencies
node_modules
Expand Down Expand Up @@ -40,8 +41,6 @@ testem.log
.DS_Store
Thumbs.db

.nx/cache

# Gradle
**/.gradle
**/build/
Expand All @@ -53,3 +52,7 @@ Thumbs.db
# Data
data/*
!data/.gitkeep

# Monitoring
monitoring/prometheus/data/
.venv/
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

29 changes: 29 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
additional_dependencies:
- "prettier@3.2.4"
- "prettier-plugin-java@2.5.0"
types_or:
- "java"

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort
args: [--resolve-all-configs]

- repo: https://github.com/pycqa/flake8
rev: "6.0.0" # pick a git hash / tag to point to
hooks:
- id: flake8
name: flake8
args: [--max-line-length=120, "--ignore=W291,W503"]
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ build/
package-lock.json
package.json
**/README.md
libs/avro/src/main/java/pfe_broker/avro/*
libs/avro/src/main/java/io/seak/avro/*
3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.

7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const config = {
plugins: [
require.resolve("prettier-plugin-java")
],
};

module.exports = config;
Loading

0 comments on commit f05da31

Please sign in to comment.