|
| 1 | +name: Dart CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - 'master' |
| 7 | + - 'test_consume_*' |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - '*' |
| 11 | + |
| 12 | +jobs: |
| 13 | + validate: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + sdk: [ 2.7.2, stable, dev ] |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + - uses: dart-lang/[email protected] |
| 22 | + with: |
| 23 | + sdk: ${{ matrix.sdk }} |
| 24 | + |
| 25 | + - name: Print Dart SDK version |
| 26 | + run: dart --version |
| 27 | + |
| 28 | + - id: install |
| 29 | + name: Install dependencies |
| 30 | + run: pub get --no-precompile |
| 31 | + |
| 32 | + - name: Validate dependencies |
| 33 | + run: pub run dependency_validator -i coverage,build_runner,build_test,build_web_compilers,meta,pedantic |
| 34 | + if: always() && steps.install.outcome == 'success' |
| 35 | + |
| 36 | + - name: Analyze project source |
| 37 | + run: if [ ${{ matrix.sdk }} = '2.7.2' ]; then pub global activate tuneup && tuneup check --ignore-infos; else dart analyze; fi |
| 38 | + if: always() && steps.install.outcome == 'success' |
| 39 | + |
| 40 | + test_ddc: |
| 41 | + runs-on: ubuntu-latest |
| 42 | + strategy: |
| 43 | + fail-fast: false |
| 44 | + matrix: |
| 45 | + sdk: [ 2.7.2, stable, dev ] |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v2 |
| 48 | + - uses: dart-lang/[email protected] |
| 49 | + with: |
| 50 | + sdk: ${{ matrix.sdk }} |
| 51 | + |
| 52 | + - name: Print Dart SDK version |
| 53 | + run: dart --version |
| 54 | + |
| 55 | + - id: install |
| 56 | + name: Install dependencies |
| 57 | + run: pub get --no-precompile |
| 58 | + |
| 59 | + - name: Run tests (DDC) |
| 60 | + run: pub run build_runner test -- test/over_react_test.dart |
| 61 | + if: always() && steps.install.outcome == 'success' |
| 62 | + |
| 63 | + test_dart2js: |
| 64 | + runs-on: ubuntu-latest |
| 65 | + strategy: |
| 66 | + fail-fast: false |
| 67 | + matrix: |
| 68 | + sdk: [ 2.7.2, stable, dev ] |
| 69 | + steps: |
| 70 | + - uses: actions/checkout@v2 |
| 71 | + - uses: dart-lang/[email protected] |
| 72 | + with: |
| 73 | + sdk: ${{ matrix.sdk }} |
| 74 | + |
| 75 | + - name: Print Dart SDK version |
| 76 | + run: dart --version |
| 77 | + |
| 78 | + - id: install |
| 79 | + name: Install dependencies |
| 80 | + run: pub get --no-precompile |
| 81 | + |
| 82 | + - name: Run tests (dart2js) |
| 83 | + run: pub run build_runner test -r -- test/over_react_test.dart |
| 84 | + if: always() && steps.install.outcome == 'success' |
0 commit comments