-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
525 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.