Skip to content

Commit

Permalink
fix: Create a codecov workflow to fix pr issues from non-org contribu…
Browse files Browse the repository at this point in the history
…tors (#47)
  • Loading branch information
mirland authored Oct 31, 2024
1 parent a00540a commit 18aa1e5
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 92 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/dart-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,4 @@ jobs:
run: flutter analyze .

- name: Run tests
run: |
dart pub global activate coverage 1.5.0
dart test --coverage=coverage && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib
- uses: codecov/codecov-action@v3
with:
verbose: true
files: ./coverage/lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
run: dart test
25 changes: 25 additions & 0 deletions .github/workflows/dart-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Dart codecov
on:
pull_request_target:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Run test coverage
run: |
dart pub global activate coverage 1.5.0
dart test --coverage=coverage && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib
- uses: codecov/codecov-action@v3
with:
verbose: true
files: ./coverage/lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/dart-pana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [pull_request]
jobs:
check:
name: pana-action
runs-on: macos-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
Expand Down
Loading

0 comments on commit 18aa1e5

Please sign in to comment.