UPDATED pubspec #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- name: pub get | |
run: dart pub get | |
- name: format | |
run: dart format --output=none --set-exit-if-changed example lib test | |
- name: analyze | |
run: dart analyze | |
- name: test | |
run: dart test test/shamsi_date_test.dart | |
- name: run example | |
run: dart run example/shamsi_date_example.dart | |
- name: install coverage package | |
run: dart pub global activate coverage | |
- name: get test coverage | |
run: dart test test/shamsi_date_test.dart --coverage dart_coverage | |
- name: format test coverage | |
run: dart pub global run coverage:format_coverage -i dart_coverage -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on lib | |
- name: upload coverage to codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage/lcov.info |