From 7d0f4967421c78903cc8c7b21c23218092ccc39e Mon Sep 17 00:00:00 2001 From: Christopher Byrd Date: Tue, 2 Apr 2024 09:43:25 -0700 Subject: [PATCH] nit --- .github/workflows/main.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 37a38c3..3cf53d1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,15 +49,6 @@ jobs: with: elasticsearch-version: 8 - - name: Webpack frontend files - run: | - echo "Removing yarn.lock due to yarn v1 package resolution issues" - echo "https://github.com/iarna/wide-align/issues/63" - cd arches_rdm_example_project - rm yarn.lock - yarn && yarn build_test - cd .. - - name: Check for missing migrations run: | python manage.py makemigrations --check @@ -69,3 +60,18 @@ jobs: - name: Report coverage run: | coverage report + + - name: Retrieve baseline coverage + run: | + git fetch origin main:main + baseline_coverage=$(git show main:.coverage | coverage report -m | grep TOTAL | awk '{print $4}') + echo "$baseline_coverage" > .coverage_baseline + + - name: Compare coverage with baseline + run: | + current_coverage=$(coverage report -m | grep TOTAL | awk '{print $4}' | sed 's/%//') + baseline_coverage=$(cat .coverage_baseline) + if (( current_coverage < baseline_coverage )); then + echo "Coverage decreased from $baseline_coverage% to $current_coverage%" + exit 1 + fi