diff --git a/.github/workflows/dart_ci.yml b/.github/workflows/ci.yml similarity index 52% rename from .github/workflows/dart_ci.yml rename to .github/workflows/ci.yml index 81741c80..df5edd99 100644 --- a/.github/workflows/dart_ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Dart CI +name: CI on: push: @@ -10,7 +10,16 @@ on: - '**' jobs: - validate: + checks: + uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.12 + with: + additional-checks: | + no_entrypoint_imports + + build: + uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.12 + + test: runs-on: ubuntu-latest strategy: fail-fast: false @@ -27,19 +36,7 @@ jobs: - id: install name: Install dependencies - run: dart pub get - - - name: Validate dependencies - run: dart run dependency_validator - if: always() && steps.install.outcome == 'success' - - - name: Validate formatting - run: dart run dart_dev format --check - if: always() && steps.install.outcome == 'success' - - - name: Analyze project source - run: dart analyze - if: always() && steps.install.outcome == 'success' + run: dart pub get --no-precompile - name: Ensure checked-in generated files are up to date run: | @@ -47,33 +44,8 @@ jobs: git diff --exit-code if: always() && steps.install.outcome == 'success' - test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - sdk: [ 2.19.6 ] - steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.2 - with: - sdk: ${{ matrix.sdk }} - - - name: Print Dart SDK version - run: dart --version - - - id: install - name: Install dependencies - run: dart pub get --no-precompile - - name: Run tests run: | echo 'Running dart pub get in test fixtures beforehand to prevent concurrent `dart pub get`s in tests from failing' (cd test/test_fixtures/over_react_project && dart pub get) dart test --exclude-tags=wsd - - - name: Create SBOM Release Asset - uses: anchore/sbom-action@v0 - with: - path: ./ - format: cyclonedx-json diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 00000000..15fd5880 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,15 @@ +name: Publish + +on: + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' + +permissions: + contents: write + id-token: write + pull-requests: write + +jobs: + publish: + uses: Workiva/gha-dart-oss/.github/workflows/publish.yaml@v0.1.11 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d902673..1126b7ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2.37.1 +- Use gha-dart-oss + ## 2.37.0 - React 18 rollout codemod: `react_18_upgrade` to update React JS file paths from the React 17 to React 18 versions. - Raise other dependency minimums: `uuid`, `web_skin_dart` diff --git a/tool/dart_dev/config.dart b/tool/dart_dev/config.dart index cf617628..02ab0c31 100644 --- a/tool/dart_dev/config.dart +++ b/tool/dart_dev/config.dart @@ -5,5 +5,6 @@ final config = { 'format': FormatTool() ..exclude = [ Glob('test/test_fixtures/**'), - ] + ], + 'analyze': AnalyzeTool(), };