Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
github-classroom[bot] committed Mar 4, 2021
0 parents commit f55d1dd
Show file tree
Hide file tree
Showing 102 changed files with 24,735 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .bettercodehub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
component_depth: 1
default_excludes: true
languages:
- name: java
production:
include:
- server/src/main/.*\.java
test:
include:
- server/src/test/.*\.java
- name: typescript
production:
include:
- client/src/app/.*\.ts
- client/src/environments/.*\.ts
exclude:
- client/src/app/.*\.spec\.ts
test:
include:
- client/src/app/.*\.spec\.ts
- client/e2e/.*\.ts
- client/src/testing/.*\.ts
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# https://editorconfig.org
# This is based on the Angular `.editorconfig`:
# https://github.com/angular/angular/blob/master/.editorconfig

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single


# Whitespace changes in Markdown files can sometimes mess with
# the Markdown formatting, so we need to avoid these kinds of
# changes.
[*.md]
max_line_length = off
trim_trailing_whitespace = false
44 changes: 44 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# These settings are synced to GitHub by https://probot.github.io/apps/settings/

repository:
# See https://developer.github.com/v3/repos/#edit for all available settings.

# Either `true` to allow squash-merging pull requests, or `false` to prevent
# squash-merging.
allow_squash_merge: false

# Either `true` to allow merging pull requests with a merge commit, or `false`
# to prevent merging pull requests with merge commits.
allow_merge_commit: true

# Either `true` to allow rebase-merging pull requests, or `false` to prevent
# rebase-merging.
allow_rebase_merge: false

branches:
- name: main
# https://developer.github.com/v3/repos/branches/#update-branch-protection
# Branch Protection settings. Set to null to disable
protection:
# Required. Require at least one approving review on a pull request, before merging. Set to null to disable.
required_pull_request_reviews:
# The number of approvals required. (1-6)
required_approving_review_count: 1
# Dismiss approved reviews automatically when a new commit is pushed.
dismiss_stale_reviews: true
# Blocks merge until code owners have reviewed.
require_code_owner_reviews: false
# Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
dismissal_restrictions:
users: []
teams: []
# Required. Require status checks to pass before merging. Set to null to disable
required_status_checks:
# Required. Require branches to be up to date before merging.
strict: true
# Required. The list of status checks to require in order to merge into this branch
contexts: ['gradle-build', 'ng-test', 'ng-e2e', 'ng-lint', 'Better Code Hub']
# Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
enforce_admins: true
# Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable.
restrictions: null
64 changes: 64 additions & 0 deletions .github/workflows/client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Client

on: [push]

defaults:
run:
working-directory: ./client

jobs:
ng-test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Cache Node modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14

- name: Install dependencies (npm ci)
run: npm ci
env:
CYPRESS_INSTALL_BINARY: 0

- name: Test (npm run test)
run: npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI

ng-lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Cache Node modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14

- name: Install dependencies (npm ci)
run: npm ci
env:
CYPRESS_INSTALL_BINARY: 0

- name: Lint (npm run lint)
run: npm run lint
50 changes: 50 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: End-to-End

on: [push]

jobs:
ng-e2e:
runs-on: ubuntu-latest

services:
mongo:
image: mongo:4.2
ports:
- '27017-27019:27017-27019'

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache Gradle artifacts (downloaded JARs, the wrapper, and any downloaded JDKs)
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.gradle/jdks
key: ${{ runner.os }}-gradle-${{ hashFiles('**/.gradle/') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14

- name: Run e2e tests
uses: cypress-io/github-action@v2
with:
start: ${{ github.workspace }}/server/gradlew run -p ${{ github.workspace }}/server/
command: npm run e2e
working-directory: ./client


32 changes: 32 additions & 0 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Server

on: [push]

jobs:
gradle-build:
runs-on: ubuntu-latest

services:
mongo:
image: mongo:4.2
ports:
- '27017-27019:27017-27019'

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Cache Gradle artifacts (downloaded JARs, the wrapper, and any downloaded JDKs)
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.gradle/jdks
key: ${{ runner.os }}-gradle-${{ hashFiles('**/.gradle/') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle
run: ./gradlew build
working-directory: ./server
Loading

0 comments on commit f55d1dd

Please sign in to comment.