blob: 63c7ff3c78cb2986d09ab3f6a0964a4f7081e68a [file] [edit]
name: package:web_socket_channel
permissions:
contents: read
on:
push:
branches:
- master
paths:
- '.github/workflows/web_socket_channel.yaml'
- 'pkgs/web_socket_channel/**'
pull_request:
paths:
- '.github/workflows/web_socket_channel.yaml'
- 'pkgs/web_socket_channel/**'
schedule:
- cron: "0 0 * * 0"
defaults:
run:
working-directory: pkgs/web_socket_channel/
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
strategy:
matrix:
sdk: [dev]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: dart-lang/setup-dart@7654d458321ee25acccccfdb86cd48bd95768ff1
with:
sdk: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
- name: Check formatting
run: dart format --output=none --set-exit-if-changed .
if: always() && steps.install.outcome == 'success'
- name: Analyze code
run: dart analyze
if: always() && steps.install.outcome == 'success'
test:
needs: analyze
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
sdk: [3.3, dev]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: dart-lang/setup-dart@7654d458321ee25acccccfdb86cd48bd95768ff1
with:
sdk: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
- name: Run VM tests
run: dart test --platform vm
if: always() && steps.install.outcome == 'success'
- name: Run Chrome tests
run: dart test --platform chrome
if: always() && steps.install.outcome == 'success'
- name: Run Chrome tests - wasm
run: dart test --platform chrome --compiler dart2wasm
if: always() && steps.install.outcome == 'success' && matrix.sdk == 'dev'
# Run analysis against the oldest supported pub constraints.
downgrade:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: dart-lang/setup-dart@7654d458321ee25acccccfdb86cd48bd95768ff1
- run: dart pub downgrade
- run: dart analyze