Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Offline files #222

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/---bug-report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/---feature-request.md

This file was deleted.

28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: "\U0001F41E Bug report"
about: Create a report to help us improve
title: ''
labels: 'T: fix'
assignees: ''

---

<!-- Thanks for taking the time to file an issue! -->

**Describe the bug**
<!-- A clear and concise description of what the bug is -->


<!-- If applicable, add screenshots to help explain your problem
**Screenshots**

| Description 1 | Description 2 |
| :------------: | :------------: |
| <screenshot 1> | <screenshot 2> |
-->

**Environment:**
<!-- Please complete the following information: -->
- Device: <!-- e.g. Samsung Galaxy S8+ -->
- OS version: <!-- e.g. Android 9.0.0 -->
- App version: <!-- e.g. 1.0.2 -->
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: "\U0001F680 Feature request"
about: Suggest an idea for this project
title: ''
labels: 'T: feat'
assignees: ''

---

<!-- Thanks for taking the time to file an issue! Please provide a clear and concise description of the problem or missing capability and possibly its solution. -->
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Please enter the corresponding issue ID: -->
**Closes: #Issue**

<!-- Please summarize your changes: -->



<!-- Add this section if you need it.
**Screenshots**

| Description 1 | Description 2 |
| :------------: | :------------: |
| <screenshot 1> | <screenshot 2> |
-->
147 changes: 47 additions & 100 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
install:
name: Install Flutter and dependencies
name: Install Flutter & dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -83,10 +83,14 @@ jobs:
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-sc:
name: Build sc (Schul-Cloud)
build:
name: Build
needs: install
runs-on: ubuntu-latest
strategy:
matrix:
flavor: ["sc", "brb", "n21", "open", "thr"]
fail-fast: false
steps:
- name: Install Java
uses: actions/setup-java@v1
Expand All @@ -103,122 +107,65 @@ jobs:
name: source
path: .

- run: flutter build apk --release --target=lib/main.dart --flavor=sc
# The default (sc) flavor doesn't have a special main.dart-suffix
- if: matrix.flavor == 'sc'
run: flutter build apk --flavor=sc
- if: matrix.flavor != 'sc'
run: flutter build apk --target=lib/main_${{ matrix.flavor }}.dart --flavor=${{ matrix.flavor }}

- name: Upload APK as artifact
uses: actions/upload-artifact@v1
with:
name: apk-sc
path: build/app/outputs/apk/sc/release
name: apk-${{ matrix.flavor }}
path: build/app/outputs/apk/${{ matrix.flavor }}/release

build-brb:
name: Build brb (Schul-Cloud Brandenburg)
deploy-internal:
name: Deploy internal
needs: install
runs-on: ubuntu-latest
# We have to use macOS for hardware acceleration on Android emulators
runs-on: macos-10.15
strategy:
matrix:
flavor: ["sc"]
fail-fast: false
steps:
- name: Install Java
- name: Install Java 12
uses: actions/setup-java@v1
with:
java-version: "12.x"
- name: Install Flutter (stable)
uses: subosito/flutter-action@v1
with:
channel: "stable"

- name: Checkout source
uses: actions/download-artifact@v1
with:
name: source
path: .

- run: flutter build apk --release --target=lib/main_brb.dart --flavor=brb

- name: Upload APK as artifact
uses: actions/upload-artifact@v1
with:
name: apk-brb
path: build/app/outputs/apk/brb/release

build-n21:
name: Build n21 (Niedersächsische Bildungscloud)
needs: install
runs-on: ubuntu-latest
steps:
- name: Install Java
- name: Install Java 10
uses: actions/setup-java@v1
with:
java-version: "12.x"
- name: Install Flutter (stable)
uses: subosito/flutter-action@v1
with:
channel: "stable"

- name: Checkout source
uses: actions/download-artifact@v1
with:
name: source
path: .

- run: flutter build apk --release --target=lib/main_n21.dart --flavor=n21

- name: Upload APK as artifact
uses: actions/upload-artifact@v1
with:
name: apk-n21
path: build/app/outputs/apk/n21/release

build-open:
name: Build open (Open Schul-Cloud)
needs: install
runs-on: ubuntu-latest
steps:
- name: Install Java
uses: actions/setup-java@v1
with:
java-version: "12.x"
- name: Install Flutter (stable)
uses: subosito/flutter-action@v1
with:
channel: "stable"

- name: Checkout source
uses: actions/download-artifact@v1
with:
name: source
path: .

- run: flutter build apk --release --target=lib/main_open.dart --flavor=open

- name: Upload APK as artifact
uses: actions/upload-artifact@v1
with:
name: apk-open
path: build/app/outputs/apk/open/release

build-thr:
name: Build thr (Thüringer Schulcloud)
needs: install
runs-on: ubuntu-latest
steps:
- name: Install Java
uses: actions/setup-java@v1
with:
java-version: "12.x"
- name: Install Flutter (stable)
uses: subosito/flutter-action@v1
with:
channel: "stable"

- name: Checkout source
uses: actions/download-artifact@v1
with:
name: source
path: .

- run: flutter build apk --release --target=lib/main_thr.dart --flavor=thr

- name: Upload APK as artifact
uses: actions/upload-artifact@v1
with:
name: apk-thr
path: build/app/outputs/apk/thr/release
java-version: 10
- name: Create virtual device
run: |
~/Library/Android/sdk/tools/bin/sdkmanager "system-images;android-28;default;x86"
echo no | ~/Library/Android/sdk/tools/bin/avdmanager --verbose create avd --force --name "Pixel_XL" --package "system-images;android-28;default;x86" --device "pixel_xl"
env:
JDK_JAVA_OPTIONS: "--add-modules java.xml.bind"
- name: Install screenshots package
run: |
brew update && brew install imagemagick
flutter pub global activate screenshots
# TODO(JonasWanke): enabled when this issue is fixed: https://github.com/flutter/flutter/issues/36244
# - name: Take screenshots
# run: flutter pub global run screenshots:main -v -f sc
# - name: Upload screenshots as artifact
# uses: actions/upload-artifact@v1
# with:
# name: screenshots-${{ matrix.flavor }}
# path: android/fastlane/metadata/android
# - uses: actions/upload-artifact@v1
# with:
# name: tmp-screenshots
# path: /tmp/screenshots
19 changes: 19 additions & 0 deletions .github/workflows/unicorn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Unicorn

on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize

jobs:
unicorn:
name: 🦄 Unicorn
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: JonasWanke/unicorn@9b4b462
with:
repo-token: "${{ secrets.UNICORN_TOKEN }}"
Loading