diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..153a5cf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + push: + branches: + - 'master' + - 'test_consume_*' + pull_request: + branches: + - '**' + +jobs: + build: + uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.11 + + checks: + uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 + with: + format-check: false + additional-checks: | + no_entrypoint_imports + + unit-tests: + uses: Workiva/gha-dart-oss/.github/workflows/test-unit.yaml@v0.1.11 + + testing-and-checks-complete: + name: Testing and Checks Completed + needs: [ build, checks, unit-tests ] + 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.' diff --git a/.github/workflows/dart_ci.yml b/.github/workflows/dart_ci.yml deleted file mode 100644 index 6954ad1..0000000 --- a/.github/workflows/dart_ci.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: Dart CI - -on: - push: - branches: - - 'master' - - 'test_consume_*' - pull_request: - branches: - - '**' - -jobs: - validate: - 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: Validate dependencies - run: dart run dependency_validator - if: always() && steps.install.outcome == 'success' - - - name: Analyze project source - run: dart analyze - if: always() && steps.install.outcome == 'success' - - - uses: anchore/sbom-action@v0 - with: - path: ./ - format: cyclonedx-json - - test_ddc: - permissions: - id-token: write - contents: read - checks: write - 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 (DDC) - run: dart run build_runner test -- --file-reporter json:reports/${{ matrix.sdk }}/ddc/test-results.json - if: always() && steps.install.outcome == 'success' - - - name: Upload Unit Test Results - uses: actions/upload-artifact@v4 - if: ${{ steps.install.outcome == 'success' && (success() || failure()) }} # run this step even if previous step failed, but not if it was skipped - with: - name: ddc-test-results@${{ matrix.sdk }} - path: reports/${{ matrix.sdk }}/ddc/test-results.json - - test_dart2js: - permissions: - id-token: write - contents: read - checks: write - 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 (dart2js) - run: dart run build_runner test -r -- --file-reporter json:reports/${{ matrix.sdk }}/dart2js/test-results.json - if: always() && steps.install.outcome == 'success' - - - name: Upload Unit Test Results - uses: actions/upload-artifact@v4 - if: ${{ steps.install.outcome == 'success' && (success() || failure()) }} # run this step even if previous step failed, but not if it was skipped - with: - name: dart2js-test-results@${{ matrix.sdk }} - path: reports/${{ matrix.sdk }}/dart2js/test-results.json diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..15fd588 --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 e2c2ccc..6f791a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # OverReact Test Changelog +## Unreleased +* Set up gha-dart-oss ([#174](https://github.com/Workiva/over_react_test/pull/174)) + ## 3.0.2 * React 18 Prep - suppress react_dom.render warnings ([#170](https://github.com/Workiva/over_react_test/pull/170))