Skip to content

fix analyze issues #3172

fix analyze issues

fix analyze issues #3172

Workflow file for this run

name: tests
on: [push, workflow_dispatch]
jobs:
tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/ndk
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
architecture: x64 # optional, x64 or arm64
- run: dart pub get
- run: dart format --output=none .
- run: dart analyze --no-fatal-warnings
- run: dart test --coverage="coverage" -j 2
- run: dart test ./example -j 2
- run: dart pub global activate coverage
- run: $HOME/.pub-cache/bin/format_coverage --ignore-files **/*.g.dart --lcov --check-ignore --in=coverage --out=coverage.lcov --report-on=lib
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage.lcov
fail_ci_if_error: true # fails only on upload errors, not coverage drops
verbose: true # optional (default = false)
nip07-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/ndk_flutter
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
architecture: x64 # optional, x64 or arm
- run: dart pub get
- run: dart analyze --no-fatal-warnings
- run: flutter test --platform chrome --concurrency=2