Skip to content

Update ci.yml (#2)

Update ci.yml (#2) #37

Workflow file for this run

name: build
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
sdk: [stable, beta, dev]
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- name: Install dependencies
run: dart pub get
- name: Check formatting
run: dart format --set-exit-if-changed .
- name: Analyze code
run: dart analyze --fatal-warnings .
- name: Run test on Chrome
run: dart test --platform chrome
continue-on-error: true
- name: Run tests
run: |
dart pub global activate coverage
dart pub global run coverage:test_with_coverage
- name: Run pana
run: |
dart pub global activate pana
dart pub global run pana --exit-code-threshold 0 --no-warning .
- name: Validate example
run: dart analyze example/holiday_event_api_example.dart
- name: Upload code coverage
if: ${{ matrix.sdk == 'stable' && matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v4
with:
files: ./coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}