diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 000000000..062c41456
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,27 @@
+## :loudspeaker: Type of change
+
+
+- [x] Bug fix (non-breaking change which fixes an issue)
+- [x] New feature (non-breaking change which adds functionality)
+- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
+- [x] This change requires a documentation update
+
+## :scroll: Description
+
+
+## :link: Related Issues
+* Fixes # (issue)
+
+## :ballot_box_with_check: Checklist:
+
+- [ ] I have performed a self-review of my own code
+- [ ] I have run the auto code formatting scripts
+- [ ] I have commented my code, particularly in hard-to-understand areas
+- [ ] I have made corresponding changes to the documentation
+- [ ] I updated the `CHANGELOG.md`
+- [ ] I have added tests that prove my fix is effective or that my feature works
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 000000000..403fcfd71
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,139 @@
+name: CI
+
+on: [push, pull_request, release]
+
+jobs:
+ main:
+ strategy:
+ # do not stop other jobs in case a single matrix jobs fails
+ fail-fast: false
+ matrix:
+ include:
+ - os: ubuntu-20.04
+ deploy: true
+ - os: windows-2019
+ deploy: false
+
+ runs-on: ${{ matrix.os }}
+ env:
+ # webpack build needs a lot of memory
+ NODE_OPTIONS: --max_old_space_size=4096
+
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@v2
+ with:
+ # Ensures all refs and tags are fetched so "git describe --always" is working as expected
+ fetch-depth: 0
+
+ # A workaround for annotated tags with actions/checkout@v2
+ # see https://github.com/actions/checkout/issues/290
+ - name: Fetch Tags correctly
+ run: git fetch --force --tags
+
+ - name: Restore Gradle cache
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.gradle/caches
+ ~/.gradle/wrapper
+ key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
+ restore-keys: |
+ ${{ runner.os }}-gradle-
+
+ - name: Restore npm cache
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.npm
+ ~/.cache/Cypress
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.os }}-node-
+
+ - name: Run Gradle checks
+ shell: bash
+ run: ./gradlew check
+
+ - name: Build Server and Companion Images
+ # Import of jib image into Windows Docker is currently not working on CI
+ if: runner.os != 'Windows'
+ # This will build the "server" image and the (minimal) companion image.
+ run: ./gradlew jibDockerBuild
+
+ # Build the companion aio (all-in-one) image only when on master or tags
+ # Because the image is huge (~15GB) we need to free up some space on GH Actions before we can build the image.
+ - name: Build Companion All-In-One Image
+ if: (runner.os != 'Windows') && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags'))
+ run: |
+ sudo rm -rf /usr/share/dotnet
+ sudo rm -rf /usr/local/lib/android
+ sudo rm -rf /opt/ghc
+ ./gradlew :cloud-companion:jibDockerBuild -P companion-build-aio
+
+ - name: Run end-to-end tests
+ # Not possible due to missing image (see step above)
+ if: runner.os != 'Windows'
+ uses: cypress-io/github-action@v2
+ with:
+ working-directory: client
+ install: false
+ start: docker run -d -e CODEFREAK_REVERSE_PROXY_URL="http://$(docker network inspect bridge -f '{{ (index .IPAM.Config 0).Gateway }}')" -v /var/run/docker.sock:/var/run/docker.sock -p8080:8080 --name=cfreak-cypress ghcr.io/codefreak/codefreak
+ config-file: cypress/cypress-ci.json
+ wait-on: 'http://localhost:8080'
+ wait-on-timeout: 180
+ headless: true
+
+ - name: Install docker-ci-deploy
+ if: matrix.deploy && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags'))
+ run: |
+ pip3 install --upgrade pip
+ pip3 install docker-ci-deploy
+
+ - name: Authenticate to GitHub Container Registry
+ if: matrix.deploy && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags'))
+ run: |
+ docker logout
+ # "Username" can be anything as we are authenticating via the default workflow access token!
+ # See https://github.com/actions/starter-workflows/issues/66
+ echo ${{ github.token }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
+
+ - name: Deploy master branch as canary
+ if: matrix.deploy && github.ref == 'refs/heads/master'
+ run: |
+ python -m docker_ci_deploy --tag canary -- ghcr.io/codefreak/codefreak
+ python -m docker_ci_deploy --tag minimal-canary -- ghcr.io/codefreak/codefreak-cloud-companion:minimal
+ python -m docker_ci_deploy --tag aio-canary -- ghcr.io/codefreak/codefreak-cloud-companion:aio
+
+ # ${GITHUB_REF/refs\/tags\//} returns the tag name from 'refs/tags/TAG_NAME'
+ # The following will only work with tags following semantic versioning!
+ # It will publish the following images:
+ # - ghcr.io/codefreak/codefreak as
+ # - ghcr.io/codefreak/codefreak:latest
+ # - ghcr.io/codefreak/codefreak:X.X.X (+ semver tags for minor and major)
+ # - ghcr.io/codefreak/codefreak-cloud-companion:minimal as
+ # - ghcr.io/codefreak/codefreak-cloud-companion:minimal
+ # - ghcr.io/codefreak/codefreak-cloud-companion:X.X.X-minimal (+ semver tags for minor and major)
+ # - ghcr.io/codefreak/codefreak-cloud-companion:aio as
+ # - ghcr.io/codefreak/codefreak-cloud-companion:aio
+ # - ghcr.io/codefreak/codefreak-cloud-companion:X.X.X-aio (+ semver tags for minor and major)
+ - name: Deploy tags
+ if: matrix.deploy && startsWith(github.ref, 'refs/tags')
+ run: |
+ export TAG_VERSION="${GITHUB_REF/refs\/tags\//}"
+ python -m docker_ci_deploy --version-latest --version "$TAG_VERSION" --version-semver ghcr.io/codefreak/codefreak
+ python -m docker_ci_deploy --version-latest --version "$TAG_VERSION" --version-semver ghcr.io/codefreak/codefreak-cloud-companion:minimal
+ python -m docker_ci_deploy --version-latest --version "$TAG_VERSION" --version-semver ghcr.io/codefreak/codefreak-cloud-companion:aio
+
+ - name: Prepare cache on Windows
+ if: runner.os == 'Windows'
+ run: |
+ ./gradlew --stop
+ Remove-Item -Force $HOME/.gradle/caches/modules-2/modules-2.lock
+ Remove-Item -Recurse -Force $HOME/.gradle/caches/*/plugin-resolution/
+
+ - name: Prepare cache on Linux
+ if: runner.os != 'Windows'
+ run: |
+ rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
+ rm -fr $HOME/.gradle/caches/*/plugin-resolution/
diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml
new file mode 100644
index 000000000..57a6f2126
--- /dev/null
+++ b/.github/workflows/publish_release.yml
@@ -0,0 +1,27 @@
+name: Publish Release
+
+on:
+ workflow_dispatch:
+ inputs:
+ releaseVersion:
+ description: 'Release version (use actual version number)'
+ required: true
+ default: '
{error.message}
+ } size="large"> + Return to Home + +
+
+ Click or drag file to this area to upload +
+
- {uploading ?
Click or drag file to this area to upload
@@ -64,7 +82,7 @@ const FileImport: React.FC
- Max. file size: {maxFileSize ? filesize(maxFileSize) : '…'} + Max. file size: {maxFileSize ? formatBytes(maxFileSize) : '…'}
+ You can select a preset from the list below which will fill your
+ "Image" and "CMD" fields with some sensible presets for the selected
+ purpose. Language-specific presets are meant to be used with their
+ corresponding Task templates (e.g. Java expects its main file at{' '}
+ src/main/java/Main.java
).
+
+ Optionally, you can specify a custom Docker image for the student
+ Online IDE. You will most likely not need this! Read more
+ about custom IDE images{' '}
+
+ Leave blank to use the default image {defaultIdeImage}
.
+
+ You can customize the CMD on the container to alter either the
+ container CMD or pass additional arguments to the container. Only use
+ this if you know what you are doing.
+
+ Warning: These values are NOT parameters for{' '}
+ docker run
!
+
+ {props.message}
+
+ )
+
+ return (
+