Skip to content

Commit b656b3f

Browse files
authored
Merge pull request Frezyx#361 from techouse/chore/simplify-github-actions
chore: simplify Github actions
2 parents 477f045 + 3fe2a1d commit b656b3f

7 files changed

+186
-315
lines changed

.github/workflows/talker.yaml

+7-51
Original file line numberDiff line numberDiff line change
@@ -5,60 +5,16 @@ on:
55
paths:
66
- "packages/talker/**"
77
- ".github/workflows/talker.yaml"
8-
98
pull_request:
109
paths:
1110
- "packages/talker/**"
1211
- ".github/workflows/talker.yaml"
12+
permissions:
13+
contents: read
1314

1415
jobs:
15-
build:
16-
defaults:
17-
run:
18-
working-directory: packages/talker
19-
20-
runs-on: ubuntu-latest
21-
22-
steps:
23-
- uses: actions/checkout@v4
24-
- uses: actions/setup-java@v4
25-
with:
26-
java-version: "12.x"
27-
distribution: 'zulu'
28-
- uses: subosito/flutter-action@v2
29-
with:
30-
channel: "stable"
31-
32-
- name: Install Dependencies
33-
run: flutter pub get
34-
35-
- name: Format
36-
run: dart format --set-exit-if-changed .
37-
38-
- name: Analyze
39-
run: flutter analyze --fatal-infos --fatal-warnings .
40-
41-
- name: Run tests
42-
run: flutter test --no-pub --coverage
43-
44-
- name: Check Code Coverage
45-
uses: VeryGoodOpenSource/[email protected]
46-
with:
47-
path: packages/talker/coverage/lcov.info
48-
min_coverage: 90
49-
50-
- name: Upload coverage to Codecov
51-
uses: codecov/codecov-action@v5
52-
with:
53-
token: ${{ secrets.CODECOV_TOKEN }}
54-
55-
# - name: Run Tests
56-
# run: |
57-
# pub global activate test_coverage
58-
# export PATH=$PATH:$HOME/.pub-cache/bin
59-
# test_coverage
60-
# - name: Check Code Coverage
61-
# uses: VeryGoodOpenSource/[email protected]
62-
# with:
63-
# min_coverage: 30
64-
# path: talker_logger/coverage/lcov.info
16+
test:
17+
uses: ./.github/workflows/test.yaml
18+
with:
19+
package: talker
20+
sdk: dart

.github/workflows/talker_bloc_logger.yaml

+7-51
Original file line numberDiff line numberDiff line change
@@ -5,60 +5,16 @@ on:
55
paths:
66
- "packages/talker_bloc_logger/**"
77
- ".github/workflows/talker_bloc_logger.yaml"
8-
98
pull_request:
109
paths:
1110
- "packages/talker_bloc_logger/**"
1211
- ".github/workflows/talker_bloc_logger.yaml"
12+
permissions:
13+
contents: read
1314

1415
jobs:
15-
build:
16-
defaults:
17-
run:
18-
working-directory: packages/talker_bloc_logger
19-
20-
runs-on: ubuntu-latest
21-
22-
steps:
23-
- uses: actions/checkout@v4
24-
- uses: actions/setup-java@v4
25-
with:
26-
java-version: "12.x"
27-
distribution: 'zulu'
28-
- uses: subosito/flutter-action@v2
29-
with:
30-
channel: "stable"
31-
32-
- name: Install Dependencies
33-
run: flutter pub get
34-
35-
- name: Format
36-
run: dart format --set-exit-if-changed .
37-
38-
- name: Analyze
39-
run: flutter analyze --fatal-infos --fatal-warnings .
40-
41-
- name: Run tests
42-
run: flutter test --no-pub --coverage
43-
44-
- name: Check Code Coverage
45-
uses: VeryGoodOpenSource/[email protected]
46-
with:
47-
path: packages/talker_bloc_logger/coverage/lcov.info
48-
min_coverage: 90
49-
50-
- name: Upload coverage to Codecov
51-
uses: codecov/codecov-action@v5
52-
with:
53-
token: ${{ secrets.CODECOV_TOKEN }}
54-
55-
# - name: Run Tests
56-
# run: |
57-
# pub global activate test_coverage
58-
# export PATH=$PATH:$HOME/.pub-cache/bin
59-
# test_coverage
60-
# - name: Check Code Coverage
61-
# uses: VeryGoodOpenSource/[email protected]
62-
# with:
63-
# min_coverage: 30
64-
# path: talker_bloc_logger_logger/coverage/lcov.info
16+
test:
17+
uses: ./.github/workflows/test.yaml
18+
with:
19+
package: talker_bloc_logger
20+
sdk: dart

.github/workflows/talker_dio_logger.yaml

+7-51
Original file line numberDiff line numberDiff line change
@@ -5,60 +5,16 @@ on:
55
paths:
66
- "packages/talker_dio_logger/**"
77
- ".github/workflows/talker_dio_logger.yaml"
8-
98
pull_request:
109
paths:
1110
- "packages/talker_dio_logger/**"
1211
- ".github/workflows/talker_dio_logger.yaml"
12+
permissions:
13+
contents: read
1314

1415
jobs:
15-
build:
16-
defaults:
17-
run:
18-
working-directory: packages/talker_dio_logger
19-
20-
runs-on: ubuntu-latest
21-
22-
steps:
23-
- uses: actions/checkout@v4
24-
- uses: actions/setup-java@v4
25-
with:
26-
java-version: "12.x"
27-
distribution: 'zulu'
28-
- uses: subosito/flutter-action@v2
29-
with:
30-
channel: "stable"
31-
32-
- name: Install Dependencies
33-
run: flutter pub get
34-
35-
- name: Format
36-
run: dart format --set-exit-if-changed .
37-
38-
- name: Analyze
39-
run: flutter analyze --fatal-infos --fatal-warnings .
40-
41-
- name: Run tests
42-
run: flutter test --no-pub --coverage
43-
44-
- name: Check Code Coverage
45-
uses: VeryGoodOpenSource/[email protected]
46-
with:
47-
path: packages/talker_dio_logger/coverage/lcov.info
48-
min_coverage: 90
49-
50-
- name: Upload coverage to Codecov
51-
uses: codecov/codecov-action@v5
52-
with:
53-
token: ${{ secrets.CODECOV_TOKEN }}
54-
55-
# - name: Run Tests
56-
# run: |
57-
# pub global activate test_coverage
58-
# export PATH=$PATH:$HOME/.pub-cache/bin
59-
# test_coverage
60-
# - name: Check Code Coverage
61-
# uses: VeryGoodOpenSource/[email protected]
62-
# with:
63-
# min_coverage: 30
64-
# path: talker_dio_logger_logger/coverage/lcov.info
16+
test:
17+
uses: ./.github/workflows/test.yaml
18+
with:
19+
package: talker_dio_logger
20+
sdk: dart

.github/workflows/talker_flutter.yaml

+7-60
Original file line numberDiff line numberDiff line change
@@ -5,69 +5,16 @@ on:
55
paths:
66
- "packages/talker_flutter/**"
77
- ".github/workflows/talker_flutter.yaml"
8-
98
pull_request:
109
paths:
1110
- "packages/talker_flutter/**"
1211
- ".github/workflows/talker_flutter.yaml"
12+
permissions:
13+
contents: read
1314

1415
jobs:
15-
build:
16-
defaults:
17-
run:
18-
working-directory: packages/talker_flutter
19-
20-
runs-on: ubuntu-latest
21-
22-
steps:
23-
- uses: actions/checkout@v4
24-
- uses: actions/setup-java@v4
25-
with:
26-
java-version: "12.x"
27-
distribution: "zulu"
28-
- uses: subosito/flutter-action@v2
29-
with:
30-
channel: "stable"
31-
32-
- name: Install Dependencies
33-
run: flutter pub get
34-
35-
- name: Format
36-
run: dart format --set-exit-if-changed .
37-
38-
- name: Analyze
39-
run: flutter analyze --fatal-infos --fatal-warnings .
40-
41-
# - name: Run tests
42-
# run: flutter test --no-pub --coverage
43-
44-
# - name: Check Code Coverage
45-
# uses: VeryGoodOpenSource/[email protected]
46-
# with:
47-
# path: packages/talker_flutter/coverage/lcov.info
48-
# min_coverage: 0
49-
50-
# - name: Upload coverage to Codecov
51-
# uses: codecov/codecov-action@v1
52-
# with:
53-
# token: ${{ secrets.CODECOV_TOKEN }}
54-
55-
# - name: Build WEB
56-
# run: |
57-
# cd example
58-
# flutter build web --release --web-renderer canvaskit
59-
60-
# - name: Deploy WEB
61-
# run: |
62-
# cd example/build/web
63-
# git init
64-
65-
# git config --global user.email [email protected]
66-
# git config --global user.name Stanislav Ilin
67-
# git status
68-
69-
# git remote add origin https://${{secrets.commit_secret}}@github.com/Frezyx/talker.git
70-
# git checkout -b gh-pages
71-
# git add --all
72-
# git commit -m "update"
73-
# git push origin gh-pages -f
16+
test:
17+
uses: ./.github/workflows/test.yaml
18+
with:
19+
package: talker_flutter
20+
sdk: flutter

.github/workflows/talker_logger.yaml

+8-51
Original file line numberDiff line numberDiff line change
@@ -5,60 +5,17 @@ on:
55
paths:
66
- "packages/talker_logger/**"
77
- ".github/workflows/talker_logger.yaml"
8-
98
pull_request:
109
paths:
1110
- "packages/talker_logger/**"
1211
- ".github/workflows/talker_logger.yaml"
12+
permissions:
13+
contents: read
1314

1415
jobs:
15-
build:
16-
defaults:
17-
run:
18-
working-directory: packages/talker_logger
19-
20-
runs-on: ubuntu-latest
21-
22-
steps:
23-
- uses: actions/checkout@v4
24-
- uses: actions/setup-java@v4
25-
with:
26-
java-version: "12.x"
27-
distribution: 'zulu'
28-
- uses: subosito/flutter-action@v2
29-
with:
30-
channel: "stable"
31-
32-
- name: Install Dependencies
33-
run: flutter pub get
34-
35-
- name: Format
36-
run: dart format --set-exit-if-changed .
37-
38-
- name: Analyze
39-
run: flutter analyze --fatal-infos --fatal-warnings .
40-
41-
- name: Run tests
42-
run: flutter test --no-pub --coverage
43-
44-
- name: Check Code Coverage
45-
uses: VeryGoodOpenSource/[email protected]
46-
with:
47-
path: packages/talker_logger/coverage/lcov.info
48-
min_coverage: 90
49-
50-
- name: Upload coverage to Codecov
51-
uses: codecov/codecov-action@v5
52-
with:
53-
token: ${{ secrets.CODECOV_TOKEN }}
54-
55-
# - name: Run Tests
56-
# run: |
57-
# pub global activate test_coverage
58-
# export PATH=$PATH:$HOME/.pub-cache/bin
59-
# test_coverage
60-
# - name: Check Code Coverage
61-
# uses: VeryGoodOpenSource/[email protected]
62-
# with:
63-
# min_coverage: 30
64-
# path: talker_logger/coverage/lcov.info
16+
test:
17+
uses: ./.github/workflows/test.yaml
18+
with:
19+
package: talker_logger
20+
sdk: dart
21+
chrome: false

0 commit comments

Comments
 (0)