Skip to content

Commit

Permalink
Move generator to pr.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev committed Mar 25, 2022
1 parent 75cf785 commit 6b2163d
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 75 deletions.
60 changes: 59 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ jobs:
differentiator: dart-linux

# macOS jobs

build-macos:
runs-on: macos-latest
name: Build macOS
Expand Down Expand Up @@ -331,3 +330,62 @@ jobs:
- name: Run tests
run: flutter drive -d windows --target=test_driver/app.dart --suppress-analytics --dart-entrypoint-args="" #--verbose #-a="Some test name"
working-directory: ./flutter/realm_flutter/tests

# generator
generator:
runs-on: ubuntu-latest
needs:
- build-linux
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: false
- name : Setup Dart SDK
uses: dart-lang/setup-dart@main
with:
sdk: stable
- name: Install generator dependencies
run: dart pub get
working-directory: ./generator/
- name: Run generator tests
run: dart test --reporter expanded --coverage ./coverage/ --test-randomize-ordering-seed random
working-directory: ./generator/
- name: Install realm_dart dependencies
run: dart pub get
- name: Run generator in realm-dart repo
run: |
find . -name "*.g.dart" -delete
dart run build_runner build --delete-conflicting-outputs
# TODO: fail the build if there are uncommitted changes as
# that would mean the generated files weren't pushed.
- name: Fetch artifacts
uses: actions/download-artifact@v2
with:
name: librealm-linux
path: binary
- name: Run realm_dart tests
run: dart test -r expanded -j 1 --test-randomize-ordering-seed random
- name: Generate generator coverage report
run: |
dart run coverage:format_coverage \
--in coverage/ \
--out ./coverage/lcov.info \
--check-ignore \
--lcov \
--packages .packages \
--report-on lib
working-directory: ./generator/
- name: Publish Generator Coverage
id: publish-generator-coverage
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: realm_generator
path-to-lcov: ./generator/coverage/lcov.info
continue-on-error: true
- name: Output Coveralls response
if: ${{ success() }}
run: echo ${{ steps.publish-generator-coverage.outputs.coveralls-api-result }}
working-directory: ./generator/
74 changes: 0 additions & 74 deletions .github/workflows/realm-generator.yml

This file was deleted.

0 comments on commit 6b2163d

Please sign in to comment.