From 57af748990393b4412e433b428e1e646933b17f3 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:20:07 +0200 Subject: [PATCH] ci: Fix codecov and dependabot default commit prefix (#1801) --- .github/dependabot.yml | 14 ++++++++++++++ .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++---- 2 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..ebfc2b23c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +# Dependabot dependency updates +# Docs: https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" + # Location of package-lock.json + directory: "/" + # Check daily for updates + schedule: + interval: "daily" + commit-message: + # Set commit message prefix + prefix: "refactor" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 795226514..56e188c31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,11 +84,34 @@ jobs: path: | ~/Library/Developer/Xcode/DerivedData/Parse-*/Logs/Test ~/Library/Developer/Xcode/DerivedData/**/Logs/Build - - name: Upload Coverage - uses: codecov/codecov-action@v3.1.1 + - name: Install test parsing dependencies + if: matrix.script == 'test:ios' + # Workaround as codecov cannot parse xcresult files; + # https://github.com/codecov/uploader/issues/1078 + # https://github.com/codecov/codecov-action/issues/1367 + run: | + brew install a7ex/homebrew-formulae/xcresultparser + - name: Convert Xcode test results for code coverage upload + if: matrix.script == 'test:ios' + env: + COVERAGE_PATH: ${{ github.workspace }}/build/${{ matrix.script }}-coverage.xml + run: | + COVERAGE_PATH=${COVERAGE_PATH//:/-} + echo COVERAGE_PATH=$COVERAGE_PATH >> $GITHUB_ENV + echo "TEST_RESULTS: $TEST_RESULTS" + echo "COVERAGE_PATH: $COVERAGE_PATH" + set -o pipefail && \ + xcresultparser --output-format cobertura \ + "$TEST_RESULTS" >"$COVERAGE_PATH" + - name: Upload code coverage + if: matrix.script == 'test:ios' + uses: codecov/codecov-action@v4 with: - xcode: true - xcode_archive_path: ${{ env.TEST_RESULTS }} + # Set to `true` once codecov token bug is fixed; https://github.com/parse-community/parse-server/issues/9129 + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} + plugin: xcode + file: ${{ env.COVERAGE_PATH }} docs: runs-on: macos-13 timeout-minutes: 15