Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ramin/merge dev into master #277

Merged
merged 4 commits into from
Nov 29, 2023
Merged
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
140 changes: 0 additions & 140 deletions .circleci/config.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!-- Please refer to this [guide](https://github.com/regentmarkets/flutter-deriv-packages/blob/master/.github/GIT_RULES.md#pr-rules) for any confusion while creating the PR -->

**Clickup link:** <!-- Add your clickup link here, Remove this line if this PR is not for a task -->
**Fixes issue:** #<!-- Issue number here, Remove this line if this PR isn't related to any issue -->

This PR contains the following changes:

<!-- Provide a description or list of changes -->

- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] πŸ› οΈ Bug fix (non-breaking change which fixes an issue)
- [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
- [ ] 🧹 Code refactor
- [ ] βœ… Build configuration change
- [ ] πŸ“ Documentation
- [ ] πŸ—‘οΈ Chore

### Developers Note (Optional)

<!-- REMOVE THIS SECTION IF IT IS NOT NEEDED.>

<!-- Add the reason of making changes in this approach so that it will be helpful to reviewers while reviewing it. -->

## Pre-launch Checklist (For PR creator)

As a creator of this PR:

<!-- Put an `x` in all the boxes that apply ([x]) -->

- [ ] ✍️ I have included clickup id and package/app_name in the PR title. <!-- Find the guide [here](https://github.com/regentmarkets/flutter-deriv-packages/blob/master/.github/GIT_RULES.md#pr-rules) -->
- [ ] πŸ‘οΈ I have gone through the code and removed any temporary changes (commented lines, prints, debug statements etc.).
- [ ] βš’οΈ I have fixed any errors/warnings shown by the analyzer/linter.
- [ ] πŸ“ I have added documentation, comments and logging wherever required.
- [ ] πŸ§ͺ I have added necessary tests for these changes.
- [ ] πŸ”Ž I have ensured all existing tests are passing.

## Reviewers

<!-- Tag the reviewers of this PR -->

## Pre-launch Checklist (For Reviewers)

As a reviewer I ensure that:

- [ ] ✴️ This PR follows the standard PR template.
- [ ] πŸͺ© The information in this PR properly reflects the code changes.
- [ ] πŸ§ͺ All the necessary tests for this PR's are passing.

## Pre-launch Checklist (For QA)

- [ ] πŸ‘Œ It passes the acceptance criteria.

## Pre-launch Checklist (For Maintainer)

- [ ] [MAINTAINER_NAME] I make sure this PR fulfills its purpose.
50 changes: 50 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Flutter Analyze, Test & Build

on:
push:
branches:
- master
- dev
pull_request:
branches:
- "*"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: "ubuntu-latest"
steps:
- name: πŸ“š Git Checkout
uses: actions/checkout@v4

- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.10.2"
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: 🀫 Set SSH Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{secrets.SSH_PRIVATE_KEY}}

- name: πŸ“¦ Install Dependencies
run: flutter pub get

- name: ✨ Check Formatting
run: dart format --set-exit-if-changed .

- name: πŸ•΅οΈ Analyze
run: flutter analyze --no-fatal-infos

- name: πŸ§ͺ Run Tests
run: flutter test

- name: Build Example app
working-directory: ./example
run: flutter build apk --target-platform android-arm,android-arm64,android-x64
6 changes: 3 additions & 3 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.6.0'
ext.kotlin_version = '1.7.21'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
12 changes: 9 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ void main() {
class MyApp extends StatelessWidget {
/// Intiialize
const MyApp({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) => MaterialApp(
localizationsDelegates: const <LocalizationsDelegate<dynamic>>[
Expand Down Expand Up @@ -133,7 +134,11 @@ class _FullscreenChartState extends State<FullscreenChart> {

Future<void> _connectToAPI() async {
_connectionBloc = connection_bloc.ConnectionCubit(ConnectionInformation(
endpoint: defaultEndpoint, appId: defaultAppID, brand: 'deriv'))
endpoint: defaultEndpoint,
appId: defaultAppID,
brand: 'deriv',
authEndpoint: '',
))
..stream.listen((connection_bloc.ConnectionState connectionState) async {
if (connectionState is! connection_bloc.ConnectionConnectedState) {
// Calling this since we show some status labels when NOT connected.
Expand All @@ -149,7 +154,7 @@ class _FullscreenChartState extends State<FullscreenChart> {
_requestCompleter.complete();
}
await _onIntervalSelected(0);
} on APIBaseException catch (e) {
} on BaseAPIException catch (e) {
await showDialog<void>(
context: context,
builder: (_) => AlertDialog(
Expand Down Expand Up @@ -308,7 +313,7 @@ class _FullscreenChartState extends State<FullscreenChart> {
WidgetsBinding.instance.addPostFrameCallback(
(Duration timeStamp) => _controller.scrollToLastTick(),
);
} on TickException catch (e) {
} on BaseAPIException catch (e) {
dev.log(e.message!, error: e);
} finally {
_completeRequest();
Expand Down Expand Up @@ -834,6 +839,7 @@ class _FullscreenChartState extends State<FullscreenChart> {
endpoint: endpoint != null
? generateEndpointUrl(endpoint: endpoint)
: defaultEndpoint,
authEndpoint: '',
);
}
}
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dev_dependencies:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_lint
ref: flutter-version-3
ref: dev
flutter_test:
sdk: flutter
intl_utils: ^2.8.2
Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: deriv_chart
description: Chart for multiplier flutter app.
version: 0.0.1
homepage: ""
publish_to: none

environment:
Expand Down Expand Up @@ -32,7 +31,7 @@ dev_dependencies:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_lint
ref: flutter-version-3
ref: dev

build_runner: ^2.3.3
intl_utils: ^2.8.2
Expand Down
Loading