Skip to content

Commit

Permalink
refactor CI testing of dart-services
Browse files Browse the repository at this point in the history
  • Loading branch information
devoncarew committed Nov 16, 2023
1 parent 1d5975a commit 1cd05ec
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 445 deletions.
59 changes: 23 additions & 36 deletions .github/workflows/dart_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ on:
- '.github/workflows/dart_services.yml'
- 'pkgs/dart_services/**'
schedule:
- cron: '0 0 * * 0' # weekly
- cron: '0 0 * * *' # daily

jobs:
# Check code formatting, static analysis, and build on a single OS (linux)
# against Dart stable and beta.
analyze:
# Check code formatting, static analysis, and build on a single OS (linux).
verify:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -29,39 +28,27 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: subosito/flutter-action@aa6d9b984461fff0e0e0673f96483607df98db84
- name: Install dependencies
with:
channel: ${{ matrix.sdk }}

- name: Install apt dependencies
run: sudo apt-get install -y protobuf-compiler redis
- name: Install dependencies

- name: Install dart dependencies
run: dart pub get
- name: Analyze code
run: dart analyze --fatal-infos .
- name: check formatting
run: dart format --set-exit-if-changed lib test tool

- name: Analyze project source
run: dart analyze --fatal-infos

- name: Verify formatting
run: dart format --set-exit-if-changed bin lib test tool

- name: Create template projects and populate the custom pub cache
run: dart run grinder build-project-templates

- name: Run tests
env:
FLUTTER_CHANNEL: ${{ matrix.sdk }}
run: |
export PATH=$PATH:$HOME/.pub-cache/bin
dart pub global activate protoc_plugin
dart run grinder test
run: dart test

# Run the benchmarks on the bots to ensure they don't regress.
benchmark:
runs-on: ubuntu-latest
defaults:
run:
working-directory: pkgs/dart_services/
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: subosito/flutter-action@aa6d9b984461fff0e0e0673f96483607df98db84
- run: sudo apt-get install -y protobuf-compiler redis
- run: dart pub get
- name: Download the Flutter SDK
run: |
flutter doctor -v
- name: Prep the repo
env:
FLUTTER_CHANNEL: stable
run: dart run grinder buildbot
- name: Run benchmarks
run: dart benchmark/bench.dart
# Build the web artifacts on the bots to ensure they don't regress.
- name: Build web artifacts
run: dart run grinder build-storage-artifacts
1 change: 0 additions & 1 deletion .github/workflows/samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ jobs:
- run: dart format --set-exit-if-changed .
- run: dart tool/samples.dart --verify
- run: flutter build web
# - run: flutter test
2 changes: 0 additions & 2 deletions .github/workflows/sketch_pad.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: subosito/flutter-action@cc97e1648fff6ca5cc647fa67f47e70f7895510b
with:
channel: 'stable'
- run: flutter pub get
- run: flutter analyze
- run: dart format --set-exit-if-changed .
Expand Down
6 changes: 1 addition & 5 deletions pkgs/dart_services/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ The server will run from port 8080 and export several JSON APIs, like

To run tests:

`dart tool/grind.dart test`

or:

`grind deploy` for all tests and checks.
`dart test`

## Redis

Expand Down
235 changes: 0 additions & 235 deletions pkgs/dart_services/benchmark/bench.dart

This file was deleted.

Loading

0 comments on commit 1cd05ec

Please sign in to comment.