Skip to content

try to split up tests #75

try to split up tests

try to split up tests #75

Workflow file for this run

name: Dart
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Analyze project source
run: dart analyze
test_vm:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Run tests on VM with coverage
run: dart run test -p vm --coverage="coverage_vm"
- name: Upload VM coverage
uses: actions/upload-artifact@v3
with:
name: coverage_vm
path: coverage_vm
test_chrome:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Run tests on Chrome with coverage
run: dart run test -p chrome --coverage="coverage_chrome"
- name: Upload Chrome coverage
uses: actions/upload-artifact@v3
with:
name: coverage_chrome
path: coverage_chrome
coverage:
runs-on: ubuntu-latest
needs: [test_vm, test_chrome]
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Download VM coverage
uses: actions/download-artifact@v3
with:
name: coverage_vm
- name: Download Chrome coverage
uses: actions/download-artifact@v3
with:
name: coverage_chrome
- name: Activate coverage tool
run: dart pub global activate coverage
- name: Format VM coverage
run: format_coverage -l -i coverage_vm -o lcov_vm.info --packages=.dart_tool/package_config.json --report-on=lib
- name: Format Chrome coverage
run: format_coverage -l -i coverage_chrome -o lcov_chrome.info --packages=.dart_tool/package_config.json --report-on=lib
- name: Merge coverage reports
run: lcov --add-tracefile lcov_vm.info --add-tracefile lcov_chrome.info --output-file lcov.info
- name: Upload merged coverage
run: bash <(curl -s https://codecov.io/bash)