Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: added github workflows
Browse files Browse the repository at this point in the history
itsezlife committed May 21, 2024
1 parent f7dd530 commit bd10e54
Showing 26 changed files with 657 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Every request must be reviewed and accepted by:

* @Gambley1
14 changes: 14 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# These are supported funding model platforms

# github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: EmilZulufov
open_collective: # Replace with a single Open Collective username
ko_fi: emilzulufov
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
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
# polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: 'fix: '
labels: bug
assignees: ''

---

**Description**

A clear and concise description of what the bug is.

**Steps To Reproduce**

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.

**Additional Context**

Add any other context about the problem here.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/build-system.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Build System
about: Changes that affect the build system or external dependencies
title: 'build: '
labels: build
assignees: ''

---

**Description**

Describe what changes need to be done to the build system and why.

**Requirements**

- [ ] The build system is passing
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/chore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Chore
about: Other changes that don't modify src or test files
title: 'chore: '
labels: chore
assignees: ''

---

**Description**

Clearly describe what change is needed and why. If this changes code then please use another issue type.

**Requirements**

- [ ] No functional changes to the code
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/continuous-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Continuous Integration
about: Changes to the CI configuration files and scripts
title: 'ci: '
labels: ci
assignees: ''

---

**Description**

Describe what changes need to be done to the ci/cd system and why.

**Requirements**

- [ ] The ci system is passing
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Documentation
about: Improve the documentation so all collaborators have a common understanding
title: 'docs: '
labels: documentation
assignees: ''

---

**Description**

Clearly describe what documentation you are looking to add or improve.

**Requirements**

- [ ] Requirements go here
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: A new feature to be added to the project
title: 'feat: '
labels: enhancement, feature
assignees: ''

---

**Description**

Clearly describe what you are looking to add. The more context the better.

**Requirements**

- [ ] Checklist of requirements to be fulfilled

**Additional Context**

Add any other context or screenshots about the feature request go here.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/performance-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Performance Update
about: A code change that improves performance
title: 'perf: '
labels: performance
assignees: ''

---

**Description**

Clearly describe what code needs to be changed and what the performance impact is going to be. Bonus point's if you can tie this directly to user experience.

**Requirements**

- [ ] There is no drop in test coverage.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Refactor
about: A code change that neither fixes a bug nor adds a feature
title: 'refactor: '
labels: refactor
assignees: ''

---

**Description**

Clearly describe what needs to be refactored and why. Please provide links to related issues (bugs or upcoming features) in order to help prioritize.

**Requirements**

- [ ] There is no drop in test coverage.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/revert-commit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Revert Commit
about: Reverts a previous commit
title: 'revert: '
labels: revert
assignees: ''

---

**Description**

Provide a link to a PR/Commit that you are looking to revert and why.

**Requirements**

- [ ] Change has been reverted
- [ ] No change in test coverage has happened
- [ ] A new ticket is created for any follow on work that needs to happen
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/style-changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Style Changes
about: Changes that do not affect the meaning of the code (white space, formatting,
missing semi-colons, etc)
title: 'style: '
labels: style
assignees: ''

---

**Description**

Clearly describe what you are looking to change and why.

**Requirements**

- [ ] There is no drop in test coverage.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Test
about: Adding missing tests or correcting existing tests
title: 'test: '
labels: test
assignees: ''

---

**Description**

List out the tests that need to be added or changed. Please also include any information as to why this was not covered in the past.

**Requirements**

- [ ] There is no drop in test coverage.
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
Thanks for contributing!
Provide a description of your changes below and a general summary in the title
Please look at the following checklist to ensure that your PR can be accepted quickly:
-->

## Description

<!--- Describe your changes in detail -->

## Type of Change

<!--- Put an `x` in all the boxes that apply: -->

- [ ] ✨ 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
99 changes: 99 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
version: 2
enable-beta-ecosystems: true
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/app_ui"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/authentication_client/authentication_client"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/authentication_client/supabase_authentication_client"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/authentication_client/token_storage"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/chats_repository"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/database_client"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/env"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/storage/storage"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/storage/secure_storage"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/storage/persistent_storage"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/firebase_remote_config_repository"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/insta_blocks"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/instagram_blocks_ui"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/posts_repository"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/powersync_repository"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/search_repository"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/shared"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/stories_repository"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/notifications_client/notifications_client"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/notifications_client/firebase_notifications_client"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/notifications_repository"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/packages/user_repository"
schedule:
interval: "daily"
17 changes: 17 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: ci

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: noop
run: echo 'noop'
19 changes: 19 additions & 0 deletions .github/workflows/spell_checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: spell_checker

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: zwaldowski/cspell-action@v1
with:
paths: "**/*.{md,dart}"
config: .vscode/cspell.json
exclude: ".gitignore"
62 changes: 62 additions & 0 deletions .github/workflows/yandex_food_delivery_clone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: yandex_food_delivery_clone

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
schedule:
- cron: "0 0 * * *"
pull_request:
paths:
- "lib/**"
- "test/**"
- "packages/**"
- "pubspec.yaml"
- ".github/workflows/yandex_food_delivery_clone.yaml"
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
channel: [stable]

steps:
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2.16.0
with:
channel: ${{matrix.channel}}
flutter-version: 3.22.0
cache: false

- name: Install Dependencies
run: |
flutter pub global activate very_good_cli
very_good packages get --recursive
- name: Format
run: dart format --set-exit-if-changed lib test

- name: Analyze
run: flutter analyze lib test

- name: Verify Generated Files Committed
run: flutter test ./test/ensure_build_test.dart --run-skipped

- name: Run tests
run: very_good test -x presubmit-only --coverage --test-randomize-ordering-seed random

- name: Check for existing and non-empty coverage file
id: test_coverage_file
run: if [ -s "/coverage/lcov.info" ]; then echo "result=true" >> $GITHUB_OUTPUT ; else echo "result=false" >> $GITHUB_OUTPUT; fi

- name: Very Good Coverage
if: steps.test_coverage_file.outputs.result == 'true'
uses: VeryGoodOpenSource/very_good_coverage@v3
with:
path: "/coverage/lcov.info"
210 changes: 210 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
{
"version": "0.2",
"enabled": true,
"language": "en",
"words": [
"undismissable",
"abcdefghijklmnopqrstuvwxyz",
"ana",
"apiaryio",
"appicon",
"archs",
"env",
"insta",
"powersync",
"db",
"isDev",
"dev",
"gambley1",
"picker",
"assetcatalog",
"autocorrect",
"autoreleasing",
"baseflow",
"bitcode",
"bselwe",
"codemagic",
"codeowners",
"commandline",
"contador",
"crashlytics",
"cret",
"cupertino",
"Cybersecurity",
"dartanalyzer",
"dartfmt",
"deremer",
"deserializes",
"Dierberger",
"droppable",
"endtemplate",
"firebaserc",
"firestore",
"fluttercommunity",
"fluttergen",
"formz",
"futura",
"gainsboro",
"gapless",
"genhtml",
"gitkeep",
"googleapis",
"GPLAY",
"Grush",
"grygezt",
"Hollister",
"Hypatia",
"infoplist",
"intelli",
"intellij",
"iphoneos",
"iphonesimulator",
"jorgecoca",
"keychain",
"lbird",
"lcov",
"lerp",
"libc",
"lightbridge",
"localizable",
"loopback",
"ltrb",
"mailchimp",
"microtask",
"Microtasks",
"mjohnson",
"mjordan",
"mkdir",
"mockingjay",
"mocktail",
"Morant",
"mostrado",
"msgsend",
"multiline",
"negatable",
"nonnull",
"Noto",
"objc",
"onesignal",
"onone",
"página",
"passcode",
"passw",
"pbxproj",
"plist",
"plists",
"PNGs",
"precompiled",
"presubmit",
"pubspec",
"pubviz",
"Qubit",
"r'Encrypted",
"r'flutter",
"r'Serving",
"RGBO",
"routable",
"runpath",
"rxdart",
"scrollable",
"sdkroot",
"serializable",
"shollister",
"signup",
"Signup",
"Sonifications",
"Stepien",
"sublist",
"templating",
"textfield",
"texto",
"trdlzja",
"unawaited",
"unfocus",
"unfocuses",
"uppercased",
"uuid",
"vgstart",
"vsync",
"wholemodule",
"wifi",
"xcassets",
"xcbuild",
"xcconfig",
"xcode",
"Xcode",
"xcodeproj",
"xcscheme",
"xcschemes",
"xcshareddata",
"xcworkspace",
"xxlg",
"xxxlg",
"xxxs",
"xxxxs",
"debouncer",
"Tappable",
"supabase",
"emmiting",
"emmit",
"fullname",
"enteractions",
"inview",
"Swipeable",
"swipeable",
"unregister",
"emojies",
"LTWH",
"fullscreen",
"Snackbars",
"Controll",
"ARGB",
"Draggable",
"Shar",
"Searc",
"autofocus",
"Behaviour",
"unfollow",
"pallete",
"Scrollbar",
"pausable",
"autovalidate",
"flutterquickstart",
"unfollower",
"Jsons",
"reciever",
"oktoast",
"gridview",
"overscroll",
"precache",
"Octo",
"Cond",
"zulufov",
"blurhash",
"splitted",
"reclip",
"sqlite",
"upsert",
"retryable",
"Postgrest",
"Postgres",
"goptions",
"Typer",
"screenutil",
"Fluttertoast",
"bluefireteam",
"timeago",
"cameraswitch",
"appbar",
"prefetch",
"giffy",
"giphy",
"ccon",
"nodoc",
"ChildLayouter",
"Paginated",
"blazingly",
"Patreon"
],
"ignorePaths": [".github/workflows/**"]
}
4 changes: 2 additions & 2 deletions lib/src/models/restaurant_details.dart
Original file line number Diff line number Diff line change
@@ -257,8 +257,8 @@ class Periods {

factory Periods.fromJson(Map<String, dynamic> json) {
return Periods(
close: Close.fromJson(json['close'] as Map<String,dynamic>),
open: Open.fromJson(json['open'] as Map<String,dynamic>),
close: Close.fromJson(json['close'] as Map<String, dynamic>),
open: Open.fromJson(json['open'] as Map<String, dynamic>),
);
}
Close close;
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@ import 'package:papa_burger/src/config/config.dart';
import 'package:papa_burger/src/models/models.dart';
import 'package:papa_burger/src/services/repositories/local_storage/local_storage.dart';

/// [LocalStorageRepository] class, is made to maintain all the logic with
/// Local Storage with [Hive]. [Hive] helps to storage the data localy
/// [LocalStorageRepository] class, is made to maintain all the logic with
/// Local Storage with [Hive]. [Hive] helps to storage the data localy
/// on the mobile devices in orders to user them offline and/or reuse data
/// without fetching for it once or more times
@immutable
@@ -139,7 +139,7 @@ class LocalStorageRepository extends BaseLocalStorageRepository {
);
}

/// Add global palce id of restaurant to cart, that helps to determine from
/// Add global palce id of restaurant to cart, that helps to determine from
/// which restaurant item was added to prevent adding from the same restaurant
@override
void addPlaceId(String placeId) {
@@ -151,7 +151,7 @@ class LocalStorageRepository extends BaseLocalStorageRepository {
}

/// After removing all items from cart, manualy removing all excisting ids
/// from storage and setting new value of 0, that means that no there is no
/// from storage and setting new value of 0, that means that no there is no
/// items in the cart and any item from any restauraurant can be added.
@override
void setRestIdTo0() {
4 changes: 2 additions & 2 deletions lib/src/services/storage/local_storage.dart
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@ import 'package:shared_preferences/shared_preferences.dart'
class LocalStorage {
factory LocalStorage() => _instance;

LocalStorage._();
LocalStorage._();

static final _instance = LocalStorage._();

late final SharedPreferences _prefs;
2 changes: 1 addition & 1 deletion lib/src/views/pages/cart/state/cart_state.dart
Original file line number Diff line number Diff line change
@@ -19,6 +19,6 @@ class CartStateEmpty extends CartState {

class CartStateWithItems extends CartState {
const CartStateWithItems(this.cart);

final Cart cart;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ignore_for_file: public_member_api_docs, sort_constructors_first
part of 'notification_bloc.dart';

enum ConnectionStatus { connected, disconnected}
enum ConnectionStatus { connected, disconnected }

class NotificationState extends Equatable {
const NotificationState._({

0 comments on commit bd10e54

Please sign in to comment.