Skip to content

Commit

Permalink
generate code before we analyze (#601)
Browse files Browse the repository at this point in the history
* generate code before we analyze

* fix config
  • Loading branch information
devoncarew committed Jan 20, 2023
1 parent 09aabe7 commit ee68765
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ on:
env:
PUB_ENVIRONMENT: bot.github

permissions: read-all

jobs:
# Check code formatting and static analysis on a single OS (linux)
# against Dart dev.
# Check code formatting and static analysis against stable and dev SDKs.
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [dev]
sdk: [stable, dev]
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
Expand All @@ -31,22 +32,20 @@ jobs:
run: dart pub get
- name: Check formatting
run: dart format --output=none --set-exit-if-changed .
if: always() && steps.install.outcome == 'success'
- name: Build generated artifacts
run: dart pub run build_runner build
- name: Analyze code
run: dart analyze lib
if: always() && steps.install.outcome == 'success'
run: dart analyze

# Run tests on a matrix consisting of two dimensions:
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
# 2. release channel: dev
# Run tests against stable and dev SDKs.
test:
needs: analyze
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
sdk: [dev]
sdk: [stable, dev]
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
Expand All @@ -64,6 +63,7 @@ jobs:
- name: Run DDC tests
run: dart run build_runner test -- --platform chrome
if: always() && steps.install.outcome == 'success'

document:
needs: analyze
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit ee68765

Please sign in to comment.