Skip to content

Create CONTRIBUTING.md #20

Create CONTRIBUTING.md

Create CONTRIBUTING.md #20

name: exponential_back_off
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
analyze-and-test:
runs-on: ubuntu-latest
steps:
- name: 📚 Git checkout
uses: actions/[email protected]
- name: 🎯 Setup Dart
uses: dart-lang/[email protected]
with:
sdk: "stable"
- run: dart --version
- name: 📦 Install dependencies
run: dart pub get
- name: 📦 Install example dependencies
run: dart pub get --directory=./example
- name: ✨ Verify formatting
run: dart format --output=none --set-exit-if-changed .
- name: 🕵️ Analyze project source
run: dart analyze --fatal-infos
- name: 🧪 Run tests
run: |
dart pub global activate coverage
dart test --coverage=./coverage --concurrency=4 --test-randomize-ordering-seed random
dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage
- name: 📊 Codecov
uses: codecov/[email protected]
with:
files: ./coverage/lcov.info
- name: 🎯 publish dry run
run: dart pub publish --dry-run
- name: 📊 Check code coverage
uses: VeryGoodOpenSource/[email protected]
with:
path: "./coverage/lcov.info"
min_coverage: 95
exclude: "**/example"
- name: 📦 Install PANA
run: dart pub global activate pana
- name: 📊 Verify PANA score
run: |
PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
echo "Score: $PANA_SCORE"
IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0];
if (( $SCORE < 120 )); then echo "The minimum score of 120 was not met!"; exit 1; fi