From 2b35fa17190dded25f4ad11f7f4c4c5765034bbb Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 11:24:04 -0700 Subject: [PATCH 01/16] spike on a scip gha action --- .github/workflows/scip.yaml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/scip.yaml diff --git a/.github/workflows/scip.yaml b/.github/workflows/scip.yaml new file mode 100644 index 0000000..d3a383e --- /dev/null +++ b/.github/workflows/scip.yaml @@ -0,0 +1,41 @@ +name: Scip + +on: + pull_request: + push: + branches: + - master + +jobs: + index: + runs-on: workiva-runner-dev + steps: + - uses: actions/checkout@v3 + - uses: dart-lang/setup-dart@v3 + with: + sdk: ${{ inputs.sdk }} + + - run: dart pub global activate --hosted-url https://pub.workiva.org scip-dart + + - run: dart pub get + + - name: scip index + run: pub global run scip-dart ./ + + # provides SRC_ENDPOINT and SRC_ACCESS_TOKEN to the src installation step + - uses: Workiva/gha-setup-credentials@v1 + with: + vault-url: https://vault-dev.workiva.org + vault-env: dev + + # Install src cli + - name: Install Sourcegraph CLI + run: | + curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o ${HOME}/bin/src + chmod +x ${HOME}/bin/src + src login + echo src endpoint $SRC_ENDPOINT + echo src access token $SRC_ACCESS_TOKEN + + - name: Upload scip to sourcegraph + run: src code-intel upload -file=index.scip -github-token="${{ env.FEF_GH_TOKEN }}" \ No newline at end of file From 9e69a2ca58510422a6af96972254fce2421753a5 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 11:27:34 -0700 Subject: [PATCH 02/16] fixed versions --- .github/workflows/checks.yaml | 50 ++++++------- .github/workflows/scip.yaml | 4 +- .github/workflows/tests.yaml | 128 +++++++++++++++++----------------- 3 files changed, 91 insertions(+), 91 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 391fb80..6ed0804 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -1,35 +1,35 @@ -name: Checks +# name: Checks -on: - pull_request: +# on: +# pull_request: -jobs: - format: - runs-on: workiva-runner-dev - steps: - - uses: actions/checkout@v3 +# jobs: +# format: +# runs-on: workiva-runner-dev +# steps: +# - uses: actions/checkout@v3 - - uses: dart-lang/setup-dart@v1 - with: - sdk: stable +# - uses: dart-lang/setup-dart@v1 +# with: +# sdk: stable - - run: dart pub get - - uses: Workiva/gha-dart/dart-format@master +# - run: dart pub get +# - uses: Workiva/gha-dart/dart-format@master - dependency-validator: - runs-on: workiva-runner-dev - steps: - - uses: actions/checkout@v3 +# dependency-validator: +# runs-on: workiva-runner-dev +# steps: +# - uses: actions/checkout@v3 - - uses: dart-lang/setup-dart@v1 - with: - sdk: stable +# - uses: dart-lang/setup-dart@v1 +# with: +# sdk: stable - - run: dart pub get +# - run: dart pub get - # TODO: convert to Workiva/gha-dart/dart-dependency-validator@master once - # https://github.com/Workiva/gha-dart/pull/4 merges - - run: dart run dependency_validator - shell: bash +# # TODO: convert to Workiva/gha-dart/dart-dependency-validator@master once +# # https://github.com/Workiva/gha-dart/pull/4 merges +# - run: dart run dependency_validator +# shell: bash \ No newline at end of file diff --git a/.github/workflows/scip.yaml b/.github/workflows/scip.yaml index d3a383e..1c664eb 100644 --- a/.github/workflows/scip.yaml +++ b/.github/workflows/scip.yaml @@ -11,7 +11,7 @@ jobs: runs-on: workiva-runner-dev steps: - uses: actions/checkout@v3 - - uses: dart-lang/setup-dart@v3 + - uses: dart-lang/setup-dart@v1 with: sdk: ${{ inputs.sdk }} @@ -23,7 +23,7 @@ jobs: run: pub global run scip-dart ./ # provides SRC_ENDPOINT and SRC_ACCESS_TOKEN to the src installation step - - uses: Workiva/gha-setup-credentials@v1 + - uses: Workiva/gha-setup-credentials@v1.0.0 with: vault-url: https://vault-dev.workiva.org vault-env: dev diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 23f147a..12639ef 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,78 +1,78 @@ -name: Tests +# name: Tests -on: - push: - branches: - - master - pull_request: +# on: +# push: +# branches: +# - master +# pull_request: -jobs: - snapshots: - runs-on: workiva-runner-dev - name: Snapshots +# jobs: +# snapshots: +# runs-on: workiva-runner-dev +# name: Snapshots - steps: - - uses: actions/checkout@v3 - - name: Install scip cli - run: | - bash -c 'curl -L "https://github.com/sourcegraph/scip/releases/download/v0.2.3/scip-linux-amd64.tar.gz"' | tar xzf - scip - ./scip --version +# steps: +# - uses: actions/checkout@v3 +# - name: Install scip cli +# run: | +# bash -c 'curl -L "https://github.com/sourcegraph/scip/releases/download/v0.2.3/scip-linux-amd64.tar.gz"' | tar xzf - scip +# ./scip --version - - uses: dart-lang/setup-dart@v1 - with: - sdk: 2.18.7 +# - uses: dart-lang/setup-dart@v1 +# with: +# sdk: 2.18.7 - # run `pub get` for the scip-dart package - - name: Pub get cli - uses: Workiva/gha-dart/pub-get@master +# # run `pub get` for the scip-dart package +# - name: Pub get cli +# uses: Workiva/gha-dart/pub-get@master - # run `pub get` for `snapshots` - - name: Pub get snapshots dir - uses: Workiva/gha-dart/pub-get@master - with: - package-path: ./snapshots/input/basic-project +# # run `pub get` for `snapshots` +# - name: Pub get snapshots dir +# uses: Workiva/gha-dart/pub-get@master +# with: +# package-path: ./snapshots/input/basic-project - - name: Snapshots Diff Check - run: | - dart ./bin/main.dart ./snapshots/input/basic-project - ./scip snapshot --to ./snapshots/output/basic-project +# - name: Snapshots Diff Check +# run: | +# dart ./bin/main.dart ./snapshots/input/basic-project +# ./scip snapshot --to ./snapshots/output/basic-project - if [[ -z "$(git status --porcelain ./snapshots/output)" ]]; - then - echo "No changes to snapshot files" - else - echo - echo "Snapshot diff detected differences, run 'make run snap' to re-generate snapshots" - git status --short ./snapshots/output - echo - exit 1 - fi +# if [[ -z "$(git status --porcelain ./snapshots/output)" ]]; +# then +# echo "No changes to snapshot files" +# else +# echo +# echo "Snapshot diff detected differences, run 'make run snap' to re-generate snapshots" +# git status --short ./snapshots/output +# echo +# exit 1 +# fi - consumer: - runs-on: workiva-runner-dev - name: Consumer +# consumer: +# runs-on: workiva-runner-dev +# name: Consumer - strategy: - matrix: - repo: ["Workiva/wdesk_sdk", "Workiva/syncdeps_dart"] +# strategy: +# matrix: +# repo: ["Workiva/wdesk_sdk", "Workiva/syncdeps_dart"] - steps: - # Setup scip-dart - - uses: actions/checkout@v3 - - uses: dart-lang/setup-dart@v1 - with: - sdk: 2.18.7 - - uses: Workiva/gha-dart/pub-get@master +# steps: +# # Setup scip-dart +# - uses: actions/checkout@v3 +# - uses: dart-lang/setup-dart@v1 +# with: +# sdk: 2.18.7 +# - uses: Workiva/gha-dart/pub-get@master - # Setup wdesk_sdk - - uses: actions/checkout@v3 - with: - repo: ${{ matrix.repo }} - path: ${{ matrix.repo }} - - uses: Workiva/gha-dart/pub-get@master - with: - package-path: ${{ matrix.repo }} +# # Setup wdesk_sdk +# - uses: actions/checkout@v3 +# with: +# repo: ${{ matrix.repo }} +# path: ${{ matrix.repo }} +# - uses: Workiva/gha-dart/pub-get@master +# with: +# package-path: ${{ matrix.repo }} - - run: | - dart ./bin/main.dart ./${{ matrix.repo }} || exit 1 +# - run: | +# dart ./bin/main.dart ./${{ matrix.repo }} || exit 1 From b60afd2541a0fcb5f6b1a8e80f1f321942af0d4e Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 11:28:30 -0700 Subject: [PATCH 03/16] t --- .github/workflows/scip.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scip.yaml b/.github/workflows/scip.yaml index 1c664eb..c938176 100644 --- a/.github/workflows/scip.yaml +++ b/.github/workflows/scip.yaml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 with: - sdk: ${{ inputs.sdk }} + sdk: 2.18.7 - run: dart pub global activate --hosted-url https://pub.workiva.org scip-dart From 127d41a9921ad419390ab0a69d7919391e4a6492 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 11:29:22 -0700 Subject: [PATCH 04/16] t --- .github/workflows/scip.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scip.yaml b/.github/workflows/scip.yaml index c938176..29f7453 100644 --- a/.github/workflows/scip.yaml +++ b/.github/workflows/scip.yaml @@ -15,7 +15,7 @@ jobs: with: sdk: 2.18.7 - - run: dart pub global activate --hosted-url https://pub.workiva.org scip-dart + - run: dart pub global activate --hosted-url https://pub.workiva.org scip_dart - run: dart pub get From 9d5f272822d05d3e48e3c8b5c963cbc38314f65b Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 12:59:17 -0700 Subject: [PATCH 05/16] t --- .github/workflows/scip.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scip.yaml b/.github/workflows/scip.yaml index 29f7453..d11abce 100644 --- a/.github/workflows/scip.yaml +++ b/.github/workflows/scip.yaml @@ -20,7 +20,7 @@ jobs: - run: dart pub get - name: scip index - run: pub global run scip-dart ./ + run: dart pub global run scip-dart ./ # provides SRC_ENDPOINT and SRC_ACCESS_TOKEN to the src installation step - uses: Workiva/gha-setup-credentials@v1.0.0 From 9ad354389f73eafe938646b46e822638c20c6eae Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 13:00:49 -0700 Subject: [PATCH 06/16] t --- .github/workflows/scip.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scip.yaml b/.github/workflows/scip.yaml index d11abce..2a8af85 100644 --- a/.github/workflows/scip.yaml +++ b/.github/workflows/scip.yaml @@ -20,7 +20,7 @@ jobs: - run: dart pub get - name: scip index - run: dart pub global run scip-dart ./ + run: dart pub global run scip_dart ./ # provides SRC_ENDPOINT and SRC_ACCESS_TOKEN to the src installation step - uses: Workiva/gha-setup-credentials@v1.0.0 From 689bc1d05a9bd52b2d42eb67dd69aeb9c649bc30 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 13:03:55 -0700 Subject: [PATCH 07/16] t --- .github/workflows/scip.yaml | 6 ++++-- pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scip.yaml b/.github/workflows/scip.yaml index 2a8af85..2647cfa 100644 --- a/.github/workflows/scip.yaml +++ b/.github/workflows/scip.yaml @@ -15,10 +15,12 @@ jobs: with: sdk: 2.18.7 - - run: dart pub global activate --hosted-url https://pub.workiva.org scip_dart - - run: dart pub get + # - run: dart pub global activate --hosted-url https://pub.workiva.org scip_dart + - run: dart pub global activate -spath . + + - name: scip index run: dart pub global run scip_dart ./ diff --git a/pubspec.yaml b/pubspec.yaml index 0e53d7b..72feec5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: ">=2.18.0 <3.0.0" executables: - scip-dart: main.dart + scip-dart: main dependencies: analyzer: ^5.4.0 From 60e538bdf205dd5a03c5f165ecae9d4de23110c0 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 13:05:12 -0700 Subject: [PATCH 08/16] t --- bin/{main.dart => scip_dart.dart} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename bin/{main.dart => scip_dart.dart} (100%) diff --git a/bin/main.dart b/bin/scip_dart.dart similarity index 100% rename from bin/main.dart rename to bin/scip_dart.dart From cb0803ac20effb66cde0943c0d47df5caa8698a9 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 13:06:27 -0700 Subject: [PATCH 09/16] t --- .github/workflows/scip.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/scip.yaml b/.github/workflows/scip.yaml index 2647cfa..3600cf7 100644 --- a/.github/workflows/scip.yaml +++ b/.github/workflows/scip.yaml @@ -6,6 +6,10 @@ on: branches: - master +permissions: + contents: read + id-token: write + jobs: index: runs-on: workiva-runner-dev From 593b2e0e4dfdf12f4c2b0dcdd5712c5d24773974 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 13:09:03 -0700 Subject: [PATCH 10/16] t --- .github/workflows/scip.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/scip.yaml b/.github/workflows/scip.yaml index 3600cf7..cc72ad7 100644 --- a/.github/workflows/scip.yaml +++ b/.github/workflows/scip.yaml @@ -37,11 +37,11 @@ jobs: # Install src cli - name: Install Sourcegraph CLI run: | - curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o ${HOME}/bin/src - chmod +x ${HOME}/bin/src - src login - echo src endpoint $SRC_ENDPOINT - echo src access token $SRC_ACCESS_TOKEN + curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o _src-cli + chmod +x _src-cli + _src-cli login + echo _src-cli endpoint $SRC_ENDPOINT + echo _src-cli access token $SRC_ACCESS_TOKEN - name: Upload scip to sourcegraph - run: src code-intel upload -file=index.scip -github-token="${{ env.FEF_GH_TOKEN }}" \ No newline at end of file + run: _src-cli code-intel upload -file=index.scip -github-token="${{ env.FEF_GH_TOKEN }}" \ No newline at end of file From e472430469694de8acb8886e7dc589703d613e89 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 13:10:09 -0700 Subject: [PATCH 11/16] t --- .github/workflows/scip.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scip.yaml b/.github/workflows/scip.yaml index cc72ad7..dbc9452 100644 --- a/.github/workflows/scip.yaml +++ b/.github/workflows/scip.yaml @@ -39,9 +39,9 @@ jobs: run: | curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o _src-cli chmod +x _src-cli - _src-cli login - echo _src-cli endpoint $SRC_ENDPOINT - echo _src-cli access token $SRC_ACCESS_TOKEN + ./_src-cli login + echo ./_src-cli endpoint $SRC_ENDPOINT + echo ./_src-cli access token $SRC_ACCESS_TOKEN - name: Upload scip to sourcegraph - run: _src-cli code-intel upload -file=index.scip -github-token="${{ env.FEF_GH_TOKEN }}" \ No newline at end of file + run: ./_src-cli code-intel upload -file=index.scip -github-token="${{ env.FEF_GH_TOKEN }}" \ No newline at end of file From f6951d86fa95b418f161ef4f188660ba29089b47 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 13:22:02 -0700 Subject: [PATCH 12/16] fix --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 72feec5..2aab2da 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: ">=2.18.0 <3.0.0" executables: - scip-dart: main + scip_dart: dependencies: analyzer: ^5.4.0 From fa936a56e62045c4d07cf7bd11d8b1ece80a8d60 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 13:28:00 -0700 Subject: [PATCH 13/16] un-committed test changes --- .github/workflows/checks.yaml | 50 ++++++------- .github/workflows/scip.yaml | 4 +- .github/workflows/tests.yaml | 128 +++++++++++++++++----------------- 3 files changed, 92 insertions(+), 90 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 6ed0804..391fb80 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -1,35 +1,35 @@ -# name: Checks +name: Checks -# on: -# pull_request: +on: + pull_request: -# jobs: -# format: -# runs-on: workiva-runner-dev -# steps: -# - uses: actions/checkout@v3 +jobs: + format: + runs-on: workiva-runner-dev + steps: + - uses: actions/checkout@v3 -# - uses: dart-lang/setup-dart@v1 -# with: -# sdk: stable + - uses: dart-lang/setup-dart@v1 + with: + sdk: stable -# - run: dart pub get -# - uses: Workiva/gha-dart/dart-format@master + - run: dart pub get + - uses: Workiva/gha-dart/dart-format@master -# dependency-validator: -# runs-on: workiva-runner-dev -# steps: -# - uses: actions/checkout@v3 + dependency-validator: + runs-on: workiva-runner-dev + steps: + - uses: actions/checkout@v3 -# - uses: dart-lang/setup-dart@v1 -# with: -# sdk: stable + - uses: dart-lang/setup-dart@v1 + with: + sdk: stable -# - run: dart pub get + - run: dart pub get -# # TODO: convert to Workiva/gha-dart/dart-dependency-validator@master once -# # https://github.com/Workiva/gha-dart/pull/4 merges -# - run: dart run dependency_validator -# shell: bash + # TODO: convert to Workiva/gha-dart/dart-dependency-validator@master once + # https://github.com/Workiva/gha-dart/pull/4 merges + - run: dart run dependency_validator + shell: bash \ No newline at end of file diff --git a/.github/workflows/scip.yaml b/.github/workflows/scip.yaml index dbc9452..d4be603 100644 --- a/.github/workflows/scip.yaml +++ b/.github/workflows/scip.yaml @@ -10,6 +10,9 @@ permissions: contents: read id-token: write + +# TODO: replace this implementation with gha-dart once this: +# https://github.com/Workiva/gha-dart/pull/7 merges jobs: index: runs-on: workiva-runner-dev @@ -24,7 +27,6 @@ jobs: # - run: dart pub global activate --hosted-url https://pub.workiva.org scip_dart - run: dart pub global activate -spath . - - name: scip index run: dart pub global run scip_dart ./ diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 12639ef..23f147a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,78 +1,78 @@ -# name: Tests +name: Tests -# on: -# push: -# branches: -# - master -# pull_request: +on: + push: + branches: + - master + pull_request: -# jobs: -# snapshots: -# runs-on: workiva-runner-dev -# name: Snapshots +jobs: + snapshots: + runs-on: workiva-runner-dev + name: Snapshots -# steps: -# - uses: actions/checkout@v3 -# - name: Install scip cli -# run: | -# bash -c 'curl -L "https://github.com/sourcegraph/scip/releases/download/v0.2.3/scip-linux-amd64.tar.gz"' | tar xzf - scip -# ./scip --version + steps: + - uses: actions/checkout@v3 + - name: Install scip cli + run: | + bash -c 'curl -L "https://github.com/sourcegraph/scip/releases/download/v0.2.3/scip-linux-amd64.tar.gz"' | tar xzf - scip + ./scip --version -# - uses: dart-lang/setup-dart@v1 -# with: -# sdk: 2.18.7 + - uses: dart-lang/setup-dart@v1 + with: + sdk: 2.18.7 -# # run `pub get` for the scip-dart package -# - name: Pub get cli -# uses: Workiva/gha-dart/pub-get@master + # run `pub get` for the scip-dart package + - name: Pub get cli + uses: Workiva/gha-dart/pub-get@master -# # run `pub get` for `snapshots` -# - name: Pub get snapshots dir -# uses: Workiva/gha-dart/pub-get@master -# with: -# package-path: ./snapshots/input/basic-project + # run `pub get` for `snapshots` + - name: Pub get snapshots dir + uses: Workiva/gha-dart/pub-get@master + with: + package-path: ./snapshots/input/basic-project -# - name: Snapshots Diff Check -# run: | -# dart ./bin/main.dart ./snapshots/input/basic-project -# ./scip snapshot --to ./snapshots/output/basic-project + - name: Snapshots Diff Check + run: | + dart ./bin/main.dart ./snapshots/input/basic-project + ./scip snapshot --to ./snapshots/output/basic-project -# if [[ -z "$(git status --porcelain ./snapshots/output)" ]]; -# then -# echo "No changes to snapshot files" -# else -# echo -# echo "Snapshot diff detected differences, run 'make run snap' to re-generate snapshots" -# git status --short ./snapshots/output -# echo -# exit 1 -# fi + if [[ -z "$(git status --porcelain ./snapshots/output)" ]]; + then + echo "No changes to snapshot files" + else + echo + echo "Snapshot diff detected differences, run 'make run snap' to re-generate snapshots" + git status --short ./snapshots/output + echo + exit 1 + fi -# consumer: -# runs-on: workiva-runner-dev -# name: Consumer + consumer: + runs-on: workiva-runner-dev + name: Consumer -# strategy: -# matrix: -# repo: ["Workiva/wdesk_sdk", "Workiva/syncdeps_dart"] + strategy: + matrix: + repo: ["Workiva/wdesk_sdk", "Workiva/syncdeps_dart"] -# steps: -# # Setup scip-dart -# - uses: actions/checkout@v3 -# - uses: dart-lang/setup-dart@v1 -# with: -# sdk: 2.18.7 -# - uses: Workiva/gha-dart/pub-get@master + steps: + # Setup scip-dart + - uses: actions/checkout@v3 + - uses: dart-lang/setup-dart@v1 + with: + sdk: 2.18.7 + - uses: Workiva/gha-dart/pub-get@master -# # Setup wdesk_sdk -# - uses: actions/checkout@v3 -# with: -# repo: ${{ matrix.repo }} -# path: ${{ matrix.repo }} -# - uses: Workiva/gha-dart/pub-get@master -# with: -# package-path: ${{ matrix.repo }} + # Setup wdesk_sdk + - uses: actions/checkout@v3 + with: + repo: ${{ matrix.repo }} + path: ${{ matrix.repo }} + - uses: Workiva/gha-dart/pub-get@master + with: + package-path: ${{ matrix.repo }} -# - run: | -# dart ./bin/main.dart ./${{ matrix.repo }} || exit 1 + - run: | + dart ./bin/main.dart ./${{ matrix.repo }} || exit 1 From 661eb84f9209f4b9b56728584f4d43d066737b3b Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 13:28:14 -0700 Subject: [PATCH 14/16] minor cleanup --- .github/workflows/scip.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/scip.yaml b/.github/workflows/scip.yaml index d4be603..6d48db5 100644 --- a/.github/workflows/scip.yaml +++ b/.github/workflows/scip.yaml @@ -24,7 +24,6 @@ jobs: - run: dart pub get - # - run: dart pub global activate --hosted-url https://pub.workiva.org scip_dart - run: dart pub global activate -spath . - name: scip index From 2280970b2968e7cc87c40650fe6146113eca3569 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 13:33:31 -0700 Subject: [PATCH 15/16] updated readme --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d4c3c2..2c91743 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,17 @@ Experimental spike on a [scip](https://github.com/sourcegraph/scip) indexer for Designed to be a replacement for [lsif_indexer](https://github.com/Workiva/lsif_indexer), with better coverage and reliability +## Installation + +```sh +dart pub global activate --hosted-url https://pub.workiva.org scip_dart +``` + ## Usage The following command will output a `index.scip` file ```sh -dart scip-dart/bin/main.dart ./path/to/project/root +dart pub global run scip_dart ./path/to/project/root ``` This file can be analyzed / displayed using the [scip cli](https://github.com/sourcegraph/scip) From 3f3f424c89fb125caa9655e557b63fed76444f9c Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 2 Mar 2023 13:41:20 -0700 Subject: [PATCH 16/16] fixed tests --- .github/workflows/tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 23f147a..ee8f3cb 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -35,7 +35,7 @@ jobs: - name: Snapshots Diff Check run: | - dart ./bin/main.dart ./snapshots/input/basic-project + dart run scip_dart ./snapshots/input/basic-project ./scip snapshot --to ./snapshots/output/basic-project if [[ -z "$(git status --porcelain ./snapshots/output)" ]]; @@ -75,4 +75,4 @@ jobs: package-path: ${{ matrix.repo }} - run: | - dart ./bin/main.dart ./${{ matrix.repo }} || exit 1 + dart run scip_dart ./${{ matrix.repo }} || exit 1