Skip to content

Commit

Permalink
Merge pull request #154 from DislikesSchool/master
Browse files Browse the repository at this point in the history
Add >60Hz support
  • Loading branch information
vyPal authored Feb 8, 2024
2 parents ba005b9 + 75a4a28 commit f37bbff
Show file tree
Hide file tree
Showing 21 changed files with 1,593 additions and 1,210 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ jobs:
with:
fetch-depth: 0
- name: Verify Changed files
uses: tj-actions/changed-files@v37
uses: tj-actions/changed-files@v41
id: verify-changed-files
with:
files: |
.github/workflows/build-patch.yml
pubspec.yaml
pubspec.lock
l10n.yaml
Expand All @@ -46,7 +47,6 @@ jobs:
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.6'
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:' # optional, change this to force refresh cache
Expand Down
31 changes: 5 additions & 26 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ jobs:
with:
fetch-depth: 0
- name: Verify Changed files
uses: tj-actions/changed-files@v37
uses: tj-actions/changed-files@v41
id: verify-changed-files
with:
files: |
.github/workflows/test-coverage.yml
pubspec.yaml
pubspec.lock
l10n.yaml
Expand All @@ -40,30 +41,6 @@ jobs:
with:
fetch-depth: 0

- name: Gradle cache
uses: gradle/gradle-build-action@v2

- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-33

- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
arch: x86_64
profile: pixel_6_pro
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."

- uses: actions/setup-java@v2
with:
distribution: 'zulu'
Expand All @@ -79,14 +56,16 @@ jobs:
- run: flutter analyze .
- run: flutter gen-l10n
- run: dart pub global run full_coverage
- run: flutter test --coverage --dart-define=USERNAME=${{ secrets.USERNAME }} --dart-define=PASSWORD=${{ secrets.PASSWORD }}
- run: flutter test --coverage
- name: run integration tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
arch: x86_64
profile: pixel_6_pro
avd-name: Pixel_6_Pro_API_31
force-avd-creation: false
ram-size: 4096M
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: flutter test integration_test/app_test.dart --coverage --dart-define=USERNAME=${{ secrets.USERNAME }} --dart-define=PASSWORD=${{ secrets.PASSWORD }} --dart-define=NAME="${{ secrets.NAME }}"
Expand Down
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

- [Table Of Contents](#table-of-contents)
- [About The Project](#about-the-project)
- [Backend Status](#backend-status)
- [Quick status](#quick-status)
- [Statuspage](#statuspage)
- [Disclaimer](#disclaimer)
- [Built With](#built-with)
- [Getting Started](#getting-started)
Expand All @@ -46,6 +49,19 @@ And that's why we made EduPage2. So far, EduPage2 lacks a pretty big amount of f

EduPage2 uses local caching on your device, and a caching server with our own privte software, which periodically updates data from EduPage, strips it of all useless data (which EduPage includes for some reason), and finally sends out to your device when requested.

## Backend Status

### Quick status

| Host | Status |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| Render.com | [![Better Stack Badge](https://uptime.betterstack.com/status-badges/v1/monitor/w8hv.svg)](https://uptime.betterstack.com/?utm_source=status_badge) |
| Deta.space | [![Better Stack Badge](https://uptime.betterstack.com/status-badges/v1/monitor/wt8i.svg)](https://uptime.betterstack.com/?utm_source=status_badge) |

### Statuspage

Currently there are two status pages for the EduPage2 backend. The one on [Better Stack](https://ep2.betteruptime.com/) which we have confirmed to work, and the other one on [Statuspage](https://edupage2.statuspage.io/) which seems to work, but we will have to wait unitl an outage occurs to test that.

## Disclaimer

**EduPage2** is an open-source project with contributions from multiple individuals and is not affiliated with or endorsed by the creators of EduPage. EduPage is a separate and (possibly) trademarked platform owned by asc Applied Software Consultants, s.r.o.
Expand All @@ -58,13 +74,12 @@ This project is open source and distributed under the [GPL-3.0 license](https://

This is a list of all the main tools, libraries and frameworks, that were used in this project

- [Flutter](https://flutter.dev/)
- [Firebase](https://firebase.google.com/)
- [OneSignal](https://onesignal.com/)
- [Flutter](https://flutter.dev/)
- [Express.js](https://expressjs.com/)
- [PlanetScale](https://planetscale.com/)
- [Passport.js](https://www.passportjs.org/)
- [Shorebird](https://shorebird.dev/)
- [Golang](https://go.dev/)
- [Gin](https://gin-gonic.com/)

## Getting Started

Expand Down
24 changes: 14 additions & 10 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,29 @@

### App versions

| Version | API | Supported | Remote patching \* | Changelog |
| Version | API | Supported | Remote patches \* | Changelog |
| ------------- | --- | ------------------ | ------------------ | ----------------------------------------------------------------------------------- |
| > 1.7.3 | β13 | :white_check_mark: | :white_check_mark: | [1.7.3...1.7.6](https://github.com/DislikesSchool/EduPage2/compare/v1.7.1...v1.7.3) |
| 1.7.1 - 1.7.3 | β13 | :white_check_mark: | :x: | [1.7.1...1.7.3](https://github.com/DislikesSchool/EduPage2/compare/v1.7.1...v1.7.3) |
| 1.7.1 | β13 | :white_check_mark: | :x: | [1.7.0...1.7.1](https://github.com/DislikesSchool/EduPage2/compare/v1.7.0...v1.7.1) |
| 1.7.0 | β12 | :warning: | :x: | [1.6.0...1.7.0](https://github.com/DislikesSchool/EduPage2/compare/v1.6.0...v1.7.0) |
| 1.6.0 | β12 | :warning: | :x: | [1.5.2...1.6.0](https://github.com/DislikesSchool/EduPage2/compare/v1.5.2...v1.6.0) |
| 1.8.2 | v1 | :white_check_mark: | :white_check_mark: | [1.8.0...1.8.2](https://github.com/DislikesSchool/EduPage2/compare/v1.8.0...v1.8.2) |
| 1.8.0 | β14 | :x: | :white_check_mark: | [1.7.9...1.8.0](https://github.com/DislikesSchool/EduPage2/compare/v1.7.9...v1.8.0) |
| 1.7.3 - 1.7.9 | β13 | :x: | :white_check_mark: | [1.7.3...1.7.9](https://github.com/DislikesSchool/EduPage2/compare/v1.7.1...v1.7.9) |
| 1.7.1 - 1.7.3 | β13 | :x: | :x: | [1.7.1...1.7.3](https://github.com/DislikesSchool/EduPage2/compare/v1.7.1...v1.7.3) |
| 1.7.1 | β13 | :x: | :x: | [1.7.0...1.7.1](https://github.com/DislikesSchool/EduPage2/compare/v1.7.0...v1.7.1) |
| 1.7.0 | β12 | :x: | :x: | [1.6.0...1.7.0](https://github.com/DislikesSchool/EduPage2/compare/v1.6.0...v1.7.0) |
| 1.6.0 | β12 | :x: | :x: | [1.5.2...1.6.0](https://github.com/DislikesSchool/EduPage2/compare/v1.5.2...v1.6.0) |
| 1.5.x | β11 | :x: | :x: | [1.5.0...1.5.2](https://github.com/DislikesSchool/EduPage2/compare/v1.5.0...v1.5.2) |
| < 1.5 | | :x: | :x: | |

\* Remote patching allows us to quickly push patches and bug fixes directly to your device without you having to redownload the app
\* Remote patches allow us to quickly push patches and bug fixes directly to your device without you having to redownload the app

### API version

| Version | Supported | New features in version |
| ------- | ------------------ | ----------------------- |
| β13 | :white_check_mark: | |
| β12 | :warning: | |
| β11 | :warning: | iCanteen setup |
| v1 | :white_check_mark: | Complete rewrite |
| β14 | :x: | |
| β13 | :x: | |
| β12 | :x: | |
| β11 | :x: | iCanteen setup |
| < β11 | :x: | |

:white_check_mark: - Version running on server
Expand Down
31 changes: 25 additions & 6 deletions integration_test/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';

import 'package:eduapge2/main.dart' as app;
import 'package:intl/intl.dart';
import 'package:shared_preferences/shared_preferences.dart';

import 'utils.dart';
Expand All @@ -25,20 +26,38 @@ void main() {
await prep(tester, username, password, name);

await tester.tap(find.byType(NavigationDestination).at(1));
await pumpUntilFound(tester, find.textContaining("Today"));
expect(find.textContaining("TODAY"), findsOneWidget);
await tester.pump(const Duration(seconds: 1));
String day = DateFormat('d', const Locale('en', 'US').toString())
.format(DateTime.now());
String month = DateFormat('MMMM', const Locale('en', 'US').toString())
.format(DateTime.now());

await pumpUntilFound(tester, find.textContaining("$day $month"));
expect(find.textContaining("$day $month"), findsWidgets);
});

testWidgets('Test TimeTable page scroll', (tester) async {
await prep(tester, username, password, name);

await tester.tap(find.byType(NavigationDestination).at(1));
await pumpUntilFound(tester, find.textContaining("Today"));
expect(find.textContaining("TODAY"), findsOneWidget);
await tester.pump(const Duration(seconds: 1));
String day = DateFormat('d', const Locale('en', 'US').toString())
.format(DateTime.now());
String month = DateFormat('MMMM', const Locale('en', 'US').toString())
.format(DateTime.now());

await pumpUntilFound(tester, find.textContaining("$day $month"));
expect(find.textContaining("$day $month"), findsWidgets);

await tester.tap(find.byKey(const Key("TimeTableScrollForward")));
await pumpUntilFound(tester, find.textContaining("Tomorrow"));
expect(find.textContaining("TOMORROW"), findsOneWidget);
await tester.pump(const Duration(seconds: 1));
day = DateFormat('d', const Locale('en').toString())
.format(DateTime.now().add(const Duration(days: 1)));
month = DateFormat('MMMM', const Locale('en').toString())
.format(DateTime.now().add(const Duration(days: 1)));

await pumpUntilFound(tester, find.textContaining("$day $month"));
expect(find.textContaining("$day $month"), findsWidgets);
});
});
}
Expand Down
Loading

0 comments on commit f37bbff

Please sign in to comment.