Skip to content

Bump version

Bump version #24

Workflow file for this run

# Build, format, analyze and test the Dart code.
name: CI
on:
# Runs on pull requests and pushes targeting the default branch
pull_request:
push:
branches: [main]
paths-ignore:
- "docs/**"
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages.
permissions:
contents: read
jobs:
ci:
name: Dart CI
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- name: Git Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Dart
uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d # v1.6.0
- name: Install dependencies
run: dart pub get
- name: Verify formatting
run: dart format — output=none — set-exit-if-changed .
- name: Analyze project source
run: dart analyze
- name: Run tests
run: |
dart pub global activate coverage
dart pub global run coverage:test_with_coverage
- name: Upload Coverage
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
directory: ./coverage
token: ${{ secrets.CODECOV_TOKEN }}
- name: Verify Coverage
uses: VeryGoodOpenSource/very_good_coverage@3b475421464c564c0714d92ce02742bd81fa9eda # v2.2.0
with:
min_coverage: "100"
- name: Verify Pub Score
run: |
dart pub global activate pana
sudo apt-get install webp
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]; TOTAL=SCORE_ARR[1]
if [ -z "$1" ]; then MINIMUM_SCORE=TOTAL; else MINIMUM_SCORE=$1; fi
if (( $SCORE < $MINIMUM_SCORE )); then echo "minimum score $MINIMUM_SCORE was not met!"; exit 1; fi