-
Notifications
You must be signed in to change notification settings - Fork 68
FED-4060 Set up gha-dart-oss #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sydneyjodon-wk
wants to merge
15
commits into
master
Choose a base branch
from
setup-gha-dart-oss
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ae7c6f4
Update Dart CI to use checks and build shared files
sydneyjodon-wk e9dffb8
Add publish.yaml
sydneyjodon-wk 7dacdcc
Update dart_dev analyze config
sydneyjodon-wk d97e294
Update changelog
sydneyjodon-wk 210cd79
Fix Dart 3 analysis
sydneyjodon-wk d1d7c27
Test
sydneyjodon-wk 97d9d85
Test
sydneyjodon-wk cf906d9
Test
sydneyjodon-wk df67e98
Test
sydneyjodon-wk 3fe02cf
Test
sydneyjodon-wk 51c6970
Test
sydneyjodon-wk a6f11ae
Make a shared workflow
sydneyjodon-wk a98617e
Make a shared workflow
sydneyjodon-wk 27d79e6
Separate dart 3 analysis
sydneyjodon-wk 2afa7b0
Add comment and pub get
sydneyjodon-wk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,30 +12,45 @@ on: | |
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 | ||
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 | ||
|
||
# Run Dart 3 analysis as a separate job outside checks above in order to pre-run the | ||
# Dart-2-only file removal script. Consolidate this job with checks above once checks.yaml | ||
# supports a pre-run option or we upgrade to Dart 3 and remove the files. | ||
stable-analyze: | ||
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. | ||
sdk: stable | ||
|
||
- name: Print Dart SDK version | ||
run: dart --version | ||
- run: dart pub get | ||
- name: Publish SBOM to Release Assets | ||
uses: anchore/sbom-action@v0 | ||
with: | ||
path: ./ | ||
format: cyclonedx-json | ||
|
||
build: | ||
- name: Delete Dart-2-only files when running on Dart 3 | ||
run: ./tool/delete_dart_2_only_files.sh | ||
|
||
- name: Analyze project source | ||
run: dart analyze | ||
|
||
test: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can't use the shared unit-test from gha-dart-oss yet because we can't run other commands beforehand - see slack thread |
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
react: [17, 18] | ||
sdk: [2.19.6, stable] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- id: setup-dart | ||
uses: dart-lang/setup-dart@v1 | ||
with: | ||
|
@@ -50,6 +65,7 @@ jobs: | |
if [[ "$DART_VERSION" =~ ^3 ]]; then | ||
./tool/delete_dart_2_only_files.sh | ||
fi | ||
|
||
- name: Switch to React 17 Test HTML | ||
if: ${{ matrix.react == 17 }} | ||
run: | | ||
|
@@ -60,18 +76,6 @@ jobs: | |
name: Install dependencies | ||
run: dart pub get | ||
|
||
- name: Validate dependencies | ||
run: dart run dependency_validator | ||
if: always() && steps.install.outcome == 'success' | ||
|
||
- name: Verify formatting | ||
run: dart run dart_dev format --check | ||
if: ${{ matrix.sdk == '2.19.6' }} | ||
|
||
- name: Analyze project source | ||
run: dart analyze | ||
if: always() && steps.install.outcome == 'success' | ||
|
||
- name: Run tests (DDC) | ||
run: | | ||
dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc --preset=react${{ matrix.react }} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I changed this from "build" to "test" - I'll update Rosie to check for the new-named CI checks before this merges