diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..dd81ca4 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,75 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + - _integration/**/* + - test_consume_workiva/** + tags: + - '**' + +jobs: + standard-dart-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dart-lang/setup-dart@v1 + with: + sdk: 2.19.6 + + - name: Print Dart SDK version + run: dart --version + + - name: Install dependencies + run: dart pub get + + - name: Validate code + run: dart run dependency_validator + + - name: Check format + run: dart run dart_dev format --check + + - name: Analyze code + run: dart run dart_dev analyze + + test-ddc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dart-lang/setup-dart@v1 + with: + sdk: 2.19.6 + + - name: Install dependencies + run: dart pub get + + - name: Run tests (DDC) + run: dart run build_runner test -- --file-reporter json:reports/ddc/test-results.json + + - name: Upload Unit Test Results + uses: actions/upload-artifact@v2 + with: + name: ddc-test-results + path: reports/ddc/test-results.json + + test-dart2js: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dart-lang/setup-dart@v1 + with: + sdk: 2.19.6 + + - name: Install dependencies + run: dart pub get + + - name: Run tests (dart2js) + run: dart run build_runner test -r -- --file-reporter json:reports/dart2js/test-results.json + + - name: Upload Unit Test Results + uses: actions/upload-artifact@v2 + with: + name: dart2js-test-results + path: reports/dart2js/test-results.json \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 5a7cb81..5814c08 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,12 +8,9 @@ environment: sdk: '>=2.12.0 <3.0.0' dev_dependencies: + build_runner: ^2.0.0 + build_test: ^2.0.0 dart_dev: ^4.0.0 - dart_dev_workiva: - hosted: - name: dart_dev_workiva - url: https://pub.workiva.org - version: ^2.0.1 dart_style: ^2.0.0 dependency_validator: ^3.0.0 test: ^1.16.5 diff --git a/skynet.yaml b/skynet.yaml index f7ff162..4f1bf43 100644 --- a/skynet.yaml +++ b/skynet.yaml @@ -1,63 +1,12 @@ -name: standard-dart-checks -description: Quality checks (analyze, format, dependency validator) -contact: 'Frontend Architecture / #support-frontend-architecture' -image: drydock.workiva.net/workiva/dart2_base_image:2 -size: large -timeout: eternal +description: contextual_message_no-op +image: drydock.workiva.net/workiva/skynet-images:bash_curl_alpinelatest-latest -scripts: - - merge_branch.sh master - - timeout 5m dart pub get - - dart analyze - - dart run dart_dev format --check - - dart run dependency_validator - ---- - -name: semver-audit -description: Runs the semver-audit tool to check for minor and major changes -contact: 'Frontend Architecture / #support-frontend-architecture' - -image: drydock.workiva.net/workiva/dart2_base_image:2 size: small -timeout: 300 - -scripts: - - merge_branch.sh master - - dart pub global activate --hosted-url https://pub.workiva.org semver_audit ^2.0.3 - - timeout 5m dart pub get - - semver_audit report - ---- - -name: unit-tests-dev -description: Runs unit tests compiled with DDC -contact: 'Frontend Architecture / #support-frontend-architecture' -image: drydock.workiva.net/workiva/dart_unit_test_image:2 -size: large -timeout: eternal - -artifacts: /testing/test-reports -test-reports: /testing/test-reports - -scripts: - - merge_branch.sh master - - timeout 5m dart pub get - - dart run dart_dev test --xunit - ---- - -name: unit-tests-release -description: Runs unit tests compiled with dart2js -contact: 'Frontend Architecture / #support-frontend-architecture' -image: drydock.workiva.net/workiva/dart_unit_test_image:2 -size: large -timeout: eternal +timeout: short -artifacts: /testing/test-reports -test-reports: /testing/test-reports +run: + on-tag: true + on-pull-request: true scripts: - - merge_branch.sh master - - timeout 5m dart pub get - - dart run dart_dev test --xunit --release + - echo "no-op, tests run in gha" \ No newline at end of file diff --git a/tool/dart_dev/config.dart b/tool/dart_dev/config.dart deleted file mode 100644 index 94172c0..0000000 --- a/tool/dart_dev/config.dart +++ /dev/null @@ -1,6 +0,0 @@ -import 'package:dart_dev/dart_dev.dart'; -import 'package:dart_dev_workiva/dart_dev_workiva.dart'; - -final Map config = { - ...workivaConfig, -};