Skip to content

FEDX-3541: Fixed dep validator #168

FEDX-3541: Fixed dep validator

FEDX-3541: Fixed dep validator #168

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- master
permissions:
pull-requests: write
contents: write
id-token: write
jobs:
checks:
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
snapshots:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dir:
- path: basic-project
- path: diagnostics
- path: dart3-features
sdk: 3.7.2
steps:
- uses: actions/checkout@v4
- name: Install scip cli
run: |
bash -c 'curl -L "https://github.com/sourcegraph/scip/releases/download/v0.3.3/scip-linux-amd64.tar.gz"' | tar xzf - scip
./scip --version
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.dir.sdk != null && matrix.dir.sdk || '2.19.6' }}
- name: pub get scip-dart package
run: dart pub get
- name: pub get
working-directory: ./snapshots/input/${{ matrix.dir.path }}
run: dart pub get
- name: Snapshots Diff Check
run: |
dart run scip_dart ./snapshots/input/${{ matrix.dir.path }} --index-pubspec
./scip snapshot --to ./snapshots/output/${{ matrix.dir.path }}
if [[ -z "$(git status --porcelain ./snapshots/output/${{ matrix.dir.path }})" ]];
then
echo "No changes to snapshot files"
else
echo
echo "Snapshot diff detected differences, run 'make regen-snapshots' to re-generate snapshots"
git --no-pager diff ./snapshots/output/${{ matrix.dir.path }}
echo
exit 1
fi
consumer:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
consumer: [
{ repo: "Workiva/over_react" },
{ repo: "Workiva/w_module" },
{ repo: "dart-lang/args", ref: "v2.4.2" } # master requires dart 3
]
steps:
# Setup scip-dart
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: 2.19.6
- run: dart pub get
# Setup repo to run on
- uses: actions/checkout@v4
with:
repository: ${{ matrix.consumer.repo }}
path: ${{ matrix.consumer.repo}}
ref: ${{ matrix.consumer.ref || 'master' }}
- run: dart pub get
working-directory: ${{ matrix.consumer.repo }}
- run: |
dart run scip_dart ./${{ matrix.consumer.repo }} || exit 1