Skip to content

Commit c9dedca

Browse files
committed
Add ci
1 parent 3b69cad commit c9dedca

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.github/workflows/timing.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: package:timing
2+
3+
on:
4+
# Run on PRs and pushes to the default branch.
5+
push:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/timing.yaml'
9+
- 'pkgs/timing/**'
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/timing.yaml'
14+
- 'pkgs/timing/**'
15+
schedule:
16+
- cron: "0 0 * * 0"
17+
18+
env:
19+
PUB_ENVIRONMENT: bot.github
20+
21+
22+
defaults:
23+
run:
24+
working-directory: pkgs/timing/
25+
26+
jobs:
27+
# Check code formatting and static analysis on a single OS (linux)
28+
# against Dart dev.
29+
analyze:
30+
runs-on: ubuntu-latest
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
sdk: [3.4, dev]
35+
steps:
36+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
37+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
38+
with:
39+
sdk: ${{ matrix.sdk }}
40+
- id: install
41+
run: dart pub get
42+
- run: dart format --output=none --set-exit-if-changed .
43+
if: always() && steps.install.outcome == 'success'
44+
- run: dart analyze --fatal-infos
45+
if: always() && steps.install.outcome == 'success'
46+
47+
# Run tests on a matrix consisting of two dimensions:
48+
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
49+
# 2. release channel: dev, 2.2.0
50+
test:
51+
needs: analyze
52+
runs-on: ${{ matrix.os }}
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
# Add macos-latest and/or windows-latest if relevant for this package.
57+
os: [ubuntu-latest]
58+
sdk: [3.4, dev]
59+
steps:
60+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
61+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
62+
with:
63+
sdk: ${{ matrix.sdk }}
64+
- id: install
65+
run: dart pub get
66+
- run: dart test --platform vm
67+
if: always() && steps.install.outcome == 'success'

0 commit comments

Comments
 (0)