-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (71 loc) · 2.51 KB
/
Copy pathci.yml
File metadata and controls
77 lines (71 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# Cancel superseded runs for the same ref.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
analyze-and-test:
name: Analyze & test (Dart ${{ matrix.sdk }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# `stable` is the enforcement leg; the pinned version guards the
# declared minimum SDK (pubspec `environment: sdk`).
sdk: [stable, "3.5.0"]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1
with:
sdk: ${{ matrix.sdk }}
- name: Install dependencies
run: dart pub get
- name: Verify formatting
if: matrix.sdk == 'stable'
run: dart format --output=none --set-exit-if-changed .
- name: Analyze (strict)
if: matrix.sdk == 'stable'
run: dart analyze --fatal-infos
- name: Analyze (compatibility)
if: matrix.sdk != 'stable'
run: dart analyze
- name: Run tests
run: dart test
- name: Run example
run: dart run example/cobs_codec_example.dart
score:
name: pub.dev score (pana)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1
- name: Install dependencies
run: dart pub get
- name: Run pana
# Fail if more than 20 of the 160 points are lost.
run: |
dart pub global activate pana
dart pub global run pana --no-warning --exit-code-threshold 20 .
conformance:
name: Conformance vectors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1
- name: Install dependencies
run: dart pub get
- name: Download shared conformance vectors
run: |
base=https://raw.githubusercontent.com/firechip/cobs-conformance/v1.1.0/vectors
curl -sSfL -o vectors.jsonl "$base/vectors.jsonl"
curl -sSfL -o sentinel.jsonl "$base/sentinel.jsonl"
curl -sSfL -o errors.jsonl "$base/errors.jsonl"
- name: Check conformance
run: dart run tool/conformance.dart vectors.jsonl sentinel.jsonl errors.jsonl