Skip to content

Commit

Permalink
Add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem committed Dec 11, 2024
1 parent 3b69cad commit c9dedca
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/timing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: package:timing

on:
# Run on PRs and pushes to the default branch.
push:
branches: [ main ]
paths:
- '.github/workflows/timing.yaml'
- 'pkgs/timing/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/timing.yaml'
- 'pkgs/timing/**'
schedule:
- cron: "0 0 * * 0"

env:
PUB_ENVIRONMENT: bot.github


defaults:
run:
working-directory: pkgs/timing/

jobs:
# Check code formatting and static analysis on a single OS (linux)
# against Dart dev.
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [3.4, dev]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: ${{ matrix.sdk }}
- id: install
run: dart pub get
- run: dart format --output=none --set-exit-if-changed .
if: always() && steps.install.outcome == 'success'
- run: dart analyze --fatal-infos
if: always() && steps.install.outcome == 'success'

# Run tests on a matrix consisting of two dimensions:
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
# 2. release channel: dev, 2.2.0
test:
needs: analyze
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest]
sdk: [3.4, dev]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: ${{ matrix.sdk }}
- id: install
run: dart pub get
- run: dart test --platform vm
if: always() && steps.install.outcome == 'success'

0 comments on commit c9dedca

Please sign in to comment.