Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 23 additions & 25 deletions .github/workflows/dart_ci.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dart CI
name: CI

on:
push:
Expand All @@ -19,22 +19,16 @@ permissions:
jobs:
# Run as a separate job outside the Dart SDK matrix below,
# since we can only emit a single SBOM.
create-sbom-release-asset:
name: Create SBOM Release Asset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: 2.19.6 # This version doesn't matter so long as it resolves.
- run: dart pub get
- name: Publish SBOM to Release Assets
uses: anchore/sbom-action@v0
with:
path: ./
format: cyclonedx-json

build:
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]

checks:
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]
with:
additional-checks: |
no_entrypoint_imports

test_and_check_generated_files:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -62,15 +56,6 @@ jobs:
./tool/update_tests_for_dart_3.sh
fi

- name: Validate dependencies
run: dart run dependency_validator
if: always() && steps.install.outcome == 'success'

- name: Verify formatting
run: dart run dart_dev format --check
# Only run on one sdk version in case there are conflicts
if: always() && matrix.sdk == '2.19.6' && steps.install.outcome == 'success'

# Analyze before generated files are created to verify that component boilerplate analysis is "clean" without the need for building
- name: Analyze example source (pre-build)
run: |
Expand Down Expand Up @@ -234,3 +219,16 @@ jobs:
run: dart run dart_dev test
if: always() && steps.install.outcome == 'success'
timeout-minutes: 8

testing-and-checks-complete:
name: Testing and Checks Completed
needs: [ build, checks, test_and_check_generated_files, validate_analyzer, analyzer_plugin ]
if: ${{ !cancelled() && github.event_name == 'pull_request' || github.ref_type == 'tag' }}
runs-on: ubuntu-latest
steps:
- run: |
if [ "${{ needs.checks.result }}" == "failure" ]; then
echo "Some checks have failed. Please fix the issues and try again."
exit 1
fi
echo 'All Testing and checks have completed.'
15 changes: 15 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tl;dr we're good, posting for posterity

At first I thought this wasn't going to work once we switch to Dart 3, since it doesn't have --force (see here), and this repo currently has warnings when analyzing the files in tools/analyzer_plugin.

But, it looks like they fixed that in dart-lang/pub#3630 (somewhere from Dart 3.3.0 to 3.4.0), so we don't have to worry about it!

In 3.4.0+, there's only a warning about tools/, but I don't think that'll prevent the package from publishing:

Validating package... (8.2s)
Package validation found the following potential issue:
* Rename the top-level "tools" directory to "tool".
  The Pub layout convention is to use singular directory names.
  Plural names won't be correctly identified by Pub and other tools.
  See https://dart.dev/tools/pub/package-layout.
The server may enforce additional checks.

Package has 1 warning.

So we're all good here; just wanted to note that!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Yeah I was wondering if that thread was solved in some other way! Thanks for checking!

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# OverReact Changelog

## Unreleased
- [#986] Set up gha-dart-oss
- [#985] Remove entrypoint imports
- [#984] Rollout React 18 to tests and example apps

## 5.4.5
- Update analyzer dependency to `>=5.13.0 <8.0.0` (allow v8)
- Update dart_style dependency to `>=2.0.0 <4.0.0` (allow v3)
Expand Down