Skip to content

Commit

Permalink
Merge pull request #247 from lichess-org/v3
Browse files Browse the repository at this point in the history
lila-fishnet v3 - new implementation with typelevel stack
  • Loading branch information
ornicar authored Dec 2, 2023
2 parents 6cb86aa + 2a1412b commit a6c84f2
Show file tree
Hide file tree
Showing 38 changed files with 1,309 additions and 685 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
name: Test
name: Continuous Integration

on: [push, pull_request]
on:
pull_request:
branches: ['**']
push:
branches: ['**']

jobs:
openjdk13:
openjdk21:
runs-on: ubuntu-latest
container: sbtscala/scala-sbt:eclipse-temurin-jammy-21.0.1_12_1.9.7_3.3.1
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 13
- run: sbt compile

- name: Checkout current branch
uses: actions/checkout@v4

- name: Compile
run: sbt compile

- name: Test
run: sbt test

- name: Check Formatting
run: sbt scalafmtCheckAll
19 changes: 17 additions & 2 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
version = "2.6.3"
version = "3.7.17"
runner.dialect = scala3

align.preset = more
maxColumn = 110
spaces.inImportCurlyBraces = true
rewrite.rules = [SortImports, RedundantParens, SortModifiers]
rewrite.rules = [SortModifiers]
rewrite.redundantBraces.stringInterpolation = true

rewrite.scala3.convertToNewSyntax = yes
rewrite.scala3.removeOptionalBraces = yes

fileOverride {
"glob:**/build.sbt" {
runner.dialect = scala213
}
"glob:**/project/**" {
runner.dialect = scala213
}
}

39 changes: 22 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
# Lila Fishnet

Proxy between lila and fishnet move clients

```
lila <-> redis <-> lila-fishnet <- http <- fishnet-clients
```

## Developement

Start:
```
```sh
sbt
```

Start with custom port:
```
sbt -Dhttp.port=9665
Start with default config:
```sh
sbt app/run
```

Start with custom config file:
Start with custom config (`redis.host` for example):
```
sbt -Dconfig.file=/path/to/my.conf
sbt -Dredis.host=redis
```

Custom config file example:
For other `config` check [Config.scala](https://github.com/lichess-org/lila-fishnet/blob/master/app/src/main/scala/Config.scala)

Run all tests (required Docker for IntegrationTest):
```
include "application"
redis.uri = "redis://127.0.0.1"
sbt app/test
```

Code formatting
###

This repository uses [scalafmt](https://scalameta.org/scalafmt/).

Please [install it for your code editor](https://scalameta.org/scalafmt/docs/installation.html)
if you're going to contribute to this project.
Run a single test:
```
sbt app/testOnly lila.fishnet.ExecutorTest
```

If you don't install it, please run `scalafmtAll` in the sbt console before committing.
Format:
```
sbt scalafmtAll
```
46 changes: 0 additions & 46 deletions app/AppLoader.scala

This file was deleted.

87 changes: 0 additions & 87 deletions app/JsonApi.scala

This file was deleted.

82 changes: 0 additions & 82 deletions app/Lila.scala

This file was deleted.

Loading

0 comments on commit a6c84f2

Please sign in to comment.