Skip to content

Commit 762e84d

Browse files
committed
fix renaming && remove tests workflow && add conditions checking success
1 parent cd753b8 commit 762e84d

File tree

3 files changed

+14
-38
lines changed

3 files changed

+14
-38
lines changed

.github/workflows/build.yaml renamed to .github/workflows/analyze.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
name: Build
1+
name: Analyze
22

33
on:
44
pull_request:
55
branches:
66
- main
7+
push:
8+
branches:
9+
- main
710

811
jobs:
912
build:
@@ -23,5 +26,5 @@ jobs:
2326
- name: Install dependencies
2427
run: dart pub global run melos bootstrap
2528

26-
- name: Linting
29+
- name: Analyze
2730
run: dart analyze .

.github/workflows/coverage.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
branches:
66
- main
7+
push:
8+
branches:
9+
- main
710

811
jobs:
912
build:
@@ -37,14 +40,19 @@ jobs:
3740
- name: Create coverage directory
3841
run: mkdir -p coverage
3942

40-
- name: Merge coverage
43+
- name: Run unit tests
4144
run: |
4245
melos exec rm -rf coverage
4346
melos run unit_test
47+
48+
- name: Calculate and merge coverage
49+
if: success()
50+
run: |
4451
melos exec --dir-exists="coverage" -- bash -c 'dart pub global run coverde filter --input coverage/lcov.info --output coverage/filtered.lcov.info --filters .g.dart'
4552
melos exec --dir-exists="coverage" -- bash -c 'dart pub global run coverde value -i coverage/filtered.lcov.info > coverage/result.txt'
4653
4754
- name: Upload coverage to Codecov
55+
if: success()
4856
uses: codecov/codecov-action@v3
4957
with:
5058
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/tests.yaml

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)