Skip to content

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuele Vaccari committed Aug 31, 2020
2 parents 5a3e248 + f636de3 commit b7220bd
Show file tree
Hide file tree
Showing 18 changed files with 525 additions and 178 deletions.
7 changes: 2 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,20 @@ insert_final_newline = true
# ij_smart_tabs = false
# ij_wrap_on_typing = false

[.travis.yml]
indent_style = space
[*.{yml,yaml}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.sh]
indent_style = tab
indent_size = 4

[Dockerfile]
indent_style = tab
indent_size = 4

[*.java]
max_line_length = 80
max_line_length = 120
# ij_java_align_consecutive_assignments = false
# ij_java_align_consecutive_variable_declarations = false
# ij_java_align_group_field_declarations = false
Expand Down
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [D3strukt0r] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: d3strukt0r # Replace with a single Patreon username
#open_collective: # Replace with a single Open Collective username
#ko_fi: # Replace with a single Ko-fi username
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
#liberapay: # Replace with a single Liberapay username
#issuehunt: # Replace with a single IssueHunt username
#otechie: # Replace with a single Otechie username
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
166 changes: 166 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
name: CI/CD

env:
IMAGE_NAME: fhnw-jass-server

on:
push:
branches:
- master
- develop
tags:
- "*"

# Run tests for any PRs.
pull_request:

workflow_dispatch:

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-latest

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

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8 # The JDK version to make available on the path.
java-package: jdk+fx # (jre, jdk, or jdk+fx) - defaults to jdk

- name: Cache local Gradle repository
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Assemble the library
run: ./gradlew :lib:assemble

- name: Assemble the server
run: ./gradlew :server:assemble

- name: Assemble the client
run: ./gradlew :client:assemble

- name: Test the library
run: ./gradlew :lib:check

- name: Test the server
run: ./gradlew :server:check

- name: Test the client
run: ./gradlew :client:check

- name: Run test build
run: |
echo "SPIGOT_VERSION=$SPIGOT_VERSION"
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
docker build . --file Dockerfile
fi
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
push:
# Ensure test job passes before pushing image.
needs: test

runs-on: ubuntu-latest
if: github.event_name != 'pull_request'

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

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8 # The JDK version to make available on the path.
java-package: jdk+fx # (jre, jdk, or jdk+fx) - defaults to jdk

- name: Cache local Gradle repository
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set variables
run: |
IMAGE_ID=${{ secrets.DOCKER_USERNAME }}/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') && echo "::set-env name=VERSIONED::$VERSION"
# Figure out correct version name
if [ "$VERSION" == "master" ]; then
VERSION=latest
elif [ "$VERSION" == "develop" ]; then
VERSION=nightly
fi
echo "IMAGE_ID=$IMAGE_ID"
echo "::set-env name=IMAGE_ID::$IMAGE_ID"
echo "VERSION=$VERSION"
echo "::set-env name=VERSION::$VERSION"
- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_NAME

- name: Log into registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin

- name: Push image to Docker Hub
run: |
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
- name: Setup Travis DPL
if: startsWith(github.ref, 'refs/tags/')
run: |
sudo apt-get update
sudo apt-get install -y ruby
sudo gem install dpl --pre
- name: Assemble the library
if: startsWith(github.ref, 'refs/tags/')
run: ./gradlew :lib:assemble

- name: Assemble distributable server
if: startsWith(github.ref, 'refs/tags/')
run: ./gradlew :server:assembleDist

- name: Assemble distributable client
if: startsWith(github.ref, 'refs/tags/')
run: ./gradlew :client:assembleDist

# https://github.com/travis-ci/dpl#github-releases
- name: Deploy to Github Releases
if: startsWith(github.ref, 'refs/tags/')
run: |
dpl releases \
--token ${{ secrets.PAT }} \
--repo ${{ github.repository }} \
--file client/build/libs/*,client/build/distributions/*,server/build/libs/*,server/build/distributions/* \
--file_glob \
--tag_name $VERSION
8 changes: 5 additions & 3 deletions .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions .idea/checkstyle.xml

This file was deleted.

5 changes: 0 additions & 5 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

65 changes: 0 additions & 65 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit b7220bd

Please sign in to comment.