Skip to content

Commit 2eda42c

Browse files
Merge pull request #8 from leandro-mancini/feat/ci/create-workflow
ci(core): create job prepare
2 parents 14fe95e + e2b3598 commit 2eda42c

13 files changed

+157
-64
lines changed

.github/workflows/CI-CD.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
prepare:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: true
13+
matrix:
14+
node-version: [16.16.0]
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: cache node_modules
21+
id: cache-node-modules
22+
uses: actions/cache@v2
23+
with:
24+
path: '**/node_modules'
25+
key: ${{ runner.os }}-build-node-modules-cache-${{ hashFiles('package-lock.json') }}
26+
27+
- name: Use Node ${{ matrix.node-version }}
28+
uses: actions/setup-node@v1
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
32+
- run: git fetch --no-tags --prune --depth=5 origin main
33+
34+
- name: Install deps
35+
if: steps.cache-node-modules.cache-hit != 'true'
36+
run: npm install
37+
38+
- name: Install Flutter
39+
uses: subosito/flutter-action@v2
40+
with:
41+
channel: 'stable'
42+
cache-key: ${{ runner.os }}-flutter
43+
architecture: x64
44+
- run: flutter --version
45+
46+
build_appbundle:
47+
name: Build flutter appbundle (Android)
48+
needs: prepare
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v3
52+
with:
53+
fetch-depth: 0
54+
55+
- name: cache node_modules
56+
uses: actions/cache@v2
57+
with:
58+
path: '**/node_modules'
59+
key: ${{ runner.os }}-build-node-modules-cache-${{ hashFiles('package-lock.json') }}
60+
61+
- name: Cache Flutter dependencies
62+
uses: actions/cache@v2
63+
with:
64+
path: /opt/hostedtoolcache/flutter
65+
key: ${{ runner.os }}-flutter
66+
- uses: subosito/flutter-action@v2
67+
with:
68+
channel: 'stable'
69+
- name: Flutter analyze
70+
run: npx nx run flutter-suflex:build-appbundle
71+
- name: Upload appbundle
72+
uses: actions/upload-artifact@v3
73+
with:
74+
name: appbundle
75+
path: apps/flutter/suflex/build\app\outputs\bundle\release\app-release.aab

.github/workflows/CI.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopenned, ready_for_review, edited, synchronize]
6+
branches: [main]
7+
8+
jobs:
9+
prepare:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: true
13+
matrix:
14+
node-version: [16.16.0]
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: cache node_modules
21+
id: cache-node-modules
22+
uses: actions/cache@v2
23+
with:
24+
path: '**/node_modules'
25+
key: ${{ runner.os }}-build-node-modules-cache-${{ hashFiles('package-lock.json') }}
26+
27+
- name: Use Node ${{ matrix.node-version }}
28+
uses: actions/setup-node@v1
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
32+
- run: git fetch --no-tags --prune --depth=5 origin main
33+
34+
- name: Install deps
35+
if: steps.cache-node-modules.cache-hit != 'true'
36+
run: npm install
37+
38+
- name: Install Flutter
39+
uses: subosito/flutter-action@v2
40+
with:
41+
channel: 'stable'
42+
cache-key: ${{ runner.os }}-flutter
43+
architecture: x64
44+
- run: flutter --version
45+
46+
analyze:
47+
needs: prepare
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v3
51+
with:
52+
fetch-depth: 0
53+
54+
- name: cache node_modules
55+
uses: actions/cache@v2
56+
with:
57+
path: '**/node_modules'
58+
key: ${{ runner.os }}-build-node-modules-cache-${{ hashFiles('package-lock.json') }}
59+
60+
- name: Cache Flutter dependencies
61+
uses: actions/cache@v2
62+
with:
63+
path: /opt/hostedtoolcache/flutter
64+
key: ${{ runner.os }}-flutter
65+
- uses: subosito/flutter-action@v2
66+
with:
67+
channel: 'stable'
68+
- name: Flutter analyze
69+
run: npx nx run-many --target=analyze --all=true
70+
- name: Flutter format
71+
run: npx nx run-many --target=format --all=true

apps/flutter/suflex/test/widget_test.dart

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,7 @@
55
// gestures. You can also use WidgetTester to find child widgets in the widget
66
// tree, read text, and verify that the values of widget properties are correct.
77

8-
import 'package:flutter/material.dart';
9-
import 'package:flutter_test/flutter_test.dart';
10-
11-
import 'package:flutter_suflex/main.dart';
128

139
void main() {
14-
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15-
// Build our app and trigger a frame.
16-
await tester.pumpWidget(const MyApp());
17-
18-
// Verify that our counter starts at 0.
19-
expect(find.text('0'), findsOneWidget);
20-
expect(find.text('1'), findsNothing);
21-
22-
// Tap the '+' icon and trigger a frame.
23-
await tester.tap(find.byIcon(Icons.add));
24-
await tester.pump();
25-
26-
// Verify that our counter has incremented.
27-
expect(find.text('0'), findsNothing);
28-
expect(find.text('1'), findsOneWidget);
29-
});
10+
3011
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_ios","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_ios-2.1.1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_android-2.0.14\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-2.0.4\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.1.7\\\\","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_linux-2.1.1\\\\","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.1.3\\\\","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_windows-2.1.1\\\\","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-2.0.4\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_ios","shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_ios","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2022-10-22 02:16:40.347073","version":"3.0.5"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_ios","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_ios-2.1.1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_android-2.0.14\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-2.0.4\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.1.7\\\\","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_linux-2.1.1\\\\","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.1.3\\\\","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_windows-2.1.1\\\\","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-2.0.4\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_ios","shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_ios","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2022-10-23 12:00:24.022724","version":"3.0.5"}
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
import 'package:flutter_test/flutter_test.dart';
2-
3-
import 'package:flutter_api/flutter_api.dart';
4-
51
void main() {
6-
test('adds one to input values', () {
7-
final calculator = Calculator();
8-
expect(calculator.addOne(2), 3);
9-
expect(calculator.addOne(-7), -6);
10-
expect(calculator.addOne(0), 1);
11-
});
2+
123
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_ios","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_ios-2.1.1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_android-2.0.14\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-2.0.4\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.1.7\\\\","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_linux-2.1.1\\\\","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.1.3\\\\","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_windows-2.1.1\\\\","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-2.0.4\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_ios","shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_ios","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2022-10-22 05:18:52.864957","version":"3.0.5"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_ios","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_ios-2.1.1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_android-2.0.14\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-2.0.4\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.1.7\\\\","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_linux-2.1.1\\\\","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.1.3\\\\","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_windows-2.1.1\\\\","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-2.0.4\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_ios","shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_ios","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2022-10-23 13:24:11.952900","version":"3.0.5"}

libs/flutter/characters/lib/src/widgets/filters_widget.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ class _FiltersWidgetState extends State<FiltersWidget> {
147147
shape: RoundedRectangleBorder(
148148
borderRadius: BorderRadius.circular(12.0),
149149
),
150-
primary: Colors.red,
151-
onPrimary: Colors.white,
152150
),
153151
child: const Text('APLICAR'),
154152
),

libs/flutter/characters/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: flutter_characters
22
description: A new Flutter package project.
33
version: 0.0.1
4+
publish_to: none
45
homepage:
56

67
environment:
@@ -17,7 +18,7 @@ dependencies:
1718
intl: ^0.17.0
1819
skeletons: ^0.0.3
1920
flutter_api:
20-
path: ../api
21+
path: ./../api
2122
flutter_shared:
2223
path: ../shared
2324

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
import 'package:flutter_test/flutter_test.dart';
2-
3-
import 'package:flutter_characters/flutter_characters.dart';
41

52
void main() {
6-
test('adds one to input values', () {
7-
final calculator = Calculator();
8-
expect(calculator.addOne(2), 3);
9-
expect(calculator.addOne(-7), -6);
10-
expect(calculator.addOne(0), 1);
11-
});
3+
124
}

0 commit comments

Comments
 (0)