Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
zelytra committed May 16, 2024
0 parents commit b4a1bbe
Show file tree
Hide file tree
Showing 42 changed files with 2,081 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

ko_fi: zelytra
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: dadodasyra, zelytra

---

## Summary

(Summarize the bug encountered concisely)

## Steps to reproduce

(How one can reproduce the issue - this is very important)

## What is the current bug behavior?

(What actually happens)

## What is the expected correct behavior?

(What you should see instead)

## Relevant logs and/or screenshots

(Paste any relevant logs - use code blocks (```) to format console output, logs, and code, as
it's very hard to read otherwise.)

## Possible fixes

(If you can, link to the line of code that might be responsible for the problem)
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: dadodasyra, zelytra

---

## Description of needs


## Drafts or UI templates


## Acceptance criteria (done when...)

_**Tip**: Write a **checkboxed** list of sentences in the present tense describing the desired state of the system._

**GOOD (clear how to verify, it reports design and interaction decisions
agreed):**

* [ ] The page shows a button only to logged in users
* [ ] The button has the style XXX and label "Logout"
* [ ] When pressed, opens a confirmation modal with "OK" and "Cancel" buttons
* [ ] ...

**BAD (cannot be activated during verification, too arbitrary):**

* [ ] Logout button
* [ ] Modal for confirmation

## Validation scenarios

_**Hint**: Use Gherkin syntax to lay them out. It is complete and explicit, human-readable but easy to convert into self-executable tests._

_**Tip**: A scenario title should describe in a complete sentence what happens in that scenario, to improve readability and indability._

**OK**: `Administrator logs into back-office`
**BAD**: `Backoffice login`

## Tasks

_This section is populated by the developer and reports the expected practical activities to meet the requirements. Useful for estimating and for day-by-day monitoring. Better if it reports checkboxes to track completion._

* [ ] Task 1
* [ ] Task 2
* ...

## Notes

*
*
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/webapp" # Location of package manifests
schedule:
interval: "weekly"
groups:
npm:
applies-to: version-updates
patterns:
- "*"
- package-ecosystem: "maven" # See documentation for possible values
directory: "/backend" # Location of package manifests
schedule:
interval: "weekly"
groups:
npm:
applies-to: version-updates
patterns:
- "*"

71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: "CI"

on:
pull_request: # Triggered on pull requests to any branch
push:
branches: # Additionally, trigger on push events to specific branches
- master

jobs:
backend-build:
runs-on: ubuntu-latest
name: Quarkus build test
defaults:
run:
working-directory: 'backend'
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Maven
run: mvn quarkus:build package

backend-test:
name: Quarkus UT
defaults:
run:
working-directory: 'backend'
runs-on: ubuntu-latest
# Permissions block is optional, useful for dependabot checks
permissions:
checks: write
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build and Run Tests
run: mvn test --batch-mode --fail-at-end
- name: Publish Test Report
if: success() || failure()
uses: scacap/action-surefire-report@v1

webapp-build:
name: Webapp Vite build test
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 18.x ]

defaults:
run:
working-directory: 'webapp'

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: webapp/package-lock.json
- run: npm ci
- run: npm run build --if-present
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Publish"

on:
push:
branches:
- master

jobs:
publish-backend:
if: "contains(github.event.head_commit.message, 'release')"
name: Backend app
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v4
with:
context: backend/
push: true
tags: zelytra/onepool-backend:latest

publish-website:
if: "contains(github.event.head_commit.message, 'release')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v4
with:
context: webapp/
push: true
tags: zelytra/onepool-webapp:latest
24 changes: 24 additions & 0 deletions webapp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
2 changes: 2 additions & 0 deletions webapp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# OnePool
An app to manage pool party, leaderboard, stats etc...
13 changes: 13 additions & 0 deletions webapp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OnePool</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading

0 comments on commit b4a1bbe

Please sign in to comment.