From b16e842849c909a971ed005fff10c44af0bb440c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Fri, 20 May 2022 11:59:42 +0200 Subject: [PATCH] fix: auto-push coverage --- .github/workflows/build.yaml | 2 ++ scripts/commit-coverage.sh | 5 +++++ 2 files changed, 7 insertions(+) create mode 100755 scripts/commit-coverage.sh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c4678ea5a4..b5e8d8cbe1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,6 +6,7 @@ on: - main paths-ignore: - website/** + - coverage/** jobs: build: @@ -39,6 +40,7 @@ jobs: - run: yarn - run: yarn lint - run: yarn run test:coverage + - run: scripts/commit-coverage.sh env: CI: true TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres diff --git a/scripts/commit-coverage.sh b/scripts/commit-coverage.sh new file mode 100755 index 0000000000..cd40fc3b80 --- /dev/null +++ b/scripts/commit-coverage.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +git add coverage +git diff-index --quiet HEAD || git commit -m 'chore: update coverage reports' +git push origin \ No newline at end of file