Skip to content

Commit

Permalink
Create dart.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sjhorn authored Mar 30, 2024
1 parent 7d1c749 commit 9f31e48
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Dart CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "0 0 * * 0"
defaults:
run:
shell: bash

jobs:
build:
name: "Dart CI"
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;dart:stable"
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1.3
with:
sdk: stable
- name: "Dependencies"
run: dart pub upgrade --no-precompile
- name: "Dart Analyzer"
run: dart analyze --fatal-infos .
- name: "Dart Formatter"
run: dart format --output=none --set-exit-if-changed .
- name: "VM Tests"
run: dart test --platform vm
- name: "Chrome Tests"
run: dart test --platform chrome
- name: "Collect coverage"
run: |
dart pub global activate coverage
dart pub global run coverage:test_with_coverage
- name: "Upload coverage"
uses: codecov/codecov-action@v3

0 comments on commit 9f31e48

Please sign in to comment.