Compare commits
No commits in common. "v1.57.0" and "v1.56.0" have entirely different histories.
3 changed files with 18 additions and 11 deletions
|
@ -113,15 +113,17 @@ jobs:
|
|||
push: false
|
||||
|
||||
eslint:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: git.kjan.de/actions/runner-bun:latest
|
||||
runs-on: ubuntu-latest
|
||||
name: eslint
|
||||
needs: changed_files
|
||||
if: ${{ needs.changed_files.outputs.frontend == 'true' || needs.changed_files.outputs.workflow == 'true' }}
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
- uses: actions/cache@v4
|
||||
working-directory: ./frontend
|
||||
with:
|
||||
|
@ -140,15 +142,17 @@ jobs:
|
|||
bun run lint
|
||||
|
||||
oxlint:
|
||||
runs-on: docker
|
||||
runs-on: ubuntu-latest
|
||||
name: oxlint
|
||||
needs: changed_files
|
||||
if: ${{ needs.changed_files.outputs.frontend == 'true' || needs.changed_files.outputs.workflow == 'true' }}
|
||||
container:
|
||||
image: git.kjan.de/actions/runner-bun:latest
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
- uses: actions/cache@v4
|
||||
working-directory: ./frontend
|
||||
with:
|
||||
|
@ -167,15 +171,17 @@ jobs:
|
|||
bun run oxlint
|
||||
|
||||
prettier:
|
||||
runs-on: docker
|
||||
runs-on: ubuntu-latest
|
||||
name: prettier
|
||||
needs: changed_files
|
||||
if: ${{ needs.changed_files.outputs.frontend == 'true' || needs.changed_files.outputs.workflow == 'true' }}
|
||||
container:
|
||||
image: git.kjan.de/actions/runner-bun:latest
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
- uses: actions/cache@v4
|
||||
working-directory: ./frontend
|
||||
with:
|
||||
|
@ -194,15 +200,17 @@ jobs:
|
|||
bun run format:check
|
||||
|
||||
test-build:
|
||||
runs-on: docker
|
||||
runs-on: ubuntu-latest
|
||||
name: test-build
|
||||
needs: changed_files
|
||||
if: ${{ needs.changed_files.outputs.frontend == 'true' || needs.changed_files.outputs.workflow == 'true' }}
|
||||
container:
|
||||
image: git.kjan.de/actions/runner-bun:latest
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
- uses: actions/cache@v4
|
||||
working-directory: ./frontend
|
||||
with:
|
||||
|
|
|
@ -12,5 +12,4 @@ import java.math.BigDecimal;
|
|||
public class CoinflipResult {
|
||||
private boolean isWin;
|
||||
private BigDecimal payout;
|
||||
private CoinSide coinSide;
|
||||
}
|
||||
|
|
|
@ -19,8 +19,8 @@ public class CoinflipService {
|
|||
public CoinflipResult play(UserEntity user, CoinflipDto coinflipDto) {
|
||||
this.balanceService.subtractFunds(user, coinflipDto.getBetAmount());
|
||||
|
||||
CoinflipResult coinflipResult = new CoinflipResult(false, BigDecimal.ZERO);
|
||||
CoinSide coinSide = this.random.nextBoolean() ? CoinSide.HEAD : CoinSide.TAILS;
|
||||
CoinflipResult coinflipResult = new CoinflipResult(false, BigDecimal.ZERO, coinSide);
|
||||
if (coinSide == coinflipDto.getCoinSide()) {
|
||||
coinflipResult.setWin(true);
|
||||
|
||||
|
|
Reference in a new issue