From 11a6029860c332ba21331b7cf3a39a4b1ac08ad1 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 17 Oct 2024 15:08:18 -0600 Subject: [PATCH 1/3] migarte to gha-dart-oss --- .github/workflows/ci.yaml | 26 +++++++++++++++++++++++++ .github/workflows/dart_ci.yaml | 35 ---------------------------------- .github/workflows/publish.yaml | 15 +++++++++++++++ 3 files changed, 41 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/dart_ci.yaml create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..c15cf3b --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,26 @@ +name: Dart CI + +on: + push: + branches: + - 'master' + - 'test_consume_*' + pull_request: + branches: + - '**' + +jobs: + checks: + strategy: + matrix: + sdk: [ 2.19.6, stable, beta ] + uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.7 + + build: + uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.7 + + unit-tests: + strategy: + matrix: + sdk: [ 2.19.6, stable, beta ] + uses: Workiva/gha-dart-oss/.github/workflows/test-unit.yaml@v0.1.7 \ No newline at end of file diff --git a/.github/workflows/dart_ci.yaml b/.github/workflows/dart_ci.yaml deleted file mode 100644 index 521d03a..0000000 --- a/.github/workflows/dart_ci.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: Dart CI - -on: - push: - branches: - - 'master' - - 'test_consume_*' - pull_request: - branches: - - '**' - -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - sdk: [ stable, beta, dev ] - steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v1 - with: - sdk: ${{ matrix.sdk }} - - name: Install dependencies - run: dart pub get - - name: Check formatting - run: dart format --output=none --set-exit-if-changed . - if: ${{ matrix.sdk == 'stable' }} - - name: Analyze project source - run: dart analyze - - name: Run tests - run: dart test - - 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 0000000..f978e2e --- /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.7 \ No newline at end of file From 3c7a6ca20c468e06c5483a7d337d444389558c4b Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 17 Oct 2024 15:12:07 -0600 Subject: [PATCH 2/3] only format for 2.19 --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c15cf3b..e3e24fe 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,6 +15,8 @@ jobs: matrix: sdk: [ 2.19.6, stable, beta ] uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.7 + with: + format-check: ${{ matrix.sdk == '2.19.6' || 'true' && 'false' }} build: uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.7 From 3224611fccccb70e304d331a11d1d9a6c30e7ac9 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 17 Oct 2024 15:14:29 -0600 Subject: [PATCH 3/3] try with bool values --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e3e24fe..1658585 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,7 @@ jobs: sdk: [ 2.19.6, stable, beta ] uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.7 with: - format-check: ${{ matrix.sdk == '2.19.6' || 'true' && 'false' }} + format-check: ${{ matrix.sdk == '2.19.6' || true && false }} build: uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.7