Skip to content

Bump actions/checkout from 3 to 4 #73

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #73

Workflow file for this run

name: Dart CI
on:
# Run on PRs and pushes to the default branch.
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
PUB_ENVIRONMENT: bot.github
jobs:
# Check code formatting and static analysis on a single OS (linux)
# against Dart dev.
analyze:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
sdk: [ stable ]
package: [ prometheus_client, prometheus_client_shelf ]
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
channel: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
working-directory: ${{ matrix.package }}
- name: Check formatting
run: dart format --output=none --set-exit-if-changed .
working-directory: ${{ matrix.package }}
if: always() && steps.install.outcome == 'success'
- name: Analyze code
run: dart analyze --fatal-infos
working-directory: ${{ matrix.package }}
if: always() && steps.install.outcome == 'success'
- name: Analyze with pana
run: dart pub global activate pana && pana --no-warning .
working-directory: ${{ matrix.package }}
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
test:
needs: analyze
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ ubuntu-latest ]
sdk: [ dev ]
package: [ prometheus_client, prometheus_client_shelf ]
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
channel: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
working-directory: ${{ matrix.package }}
- name: Run VM tests
run: dart test --platform vm
working-directory: ${{ matrix.package }}
if: always() && steps.install.outcome == 'success'