From f1683bdaa3c2e72a2251a1a3584d011a71f4b14b Mon Sep 17 00:00:00 2001 From: huangzhangshu Date: Wed, 4 Sep 2024 19:31:44 +0800 Subject: [PATCH] chore: add shellspec ci --- .github/workflows/shellspec-push.yml | 30 +--------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/.github/workflows/shellspec-push.yml b/.github/workflows/shellspec-push.yml index a499b5281..bbe6f8fbd 100644 --- a/.github/workflows/shellspec-push.yml +++ b/.github/workflows/shellspec-push.yml @@ -52,43 +52,15 @@ jobs: done echo shell_file_path=$SHELL_FILE_PATH >> $GITHUB_OUTPUT - - name: Install packages - if: ${{ steps.get_file_path.outputs.shell_file_path }} - run: sudo apt-get install -y bash kcov - - - name: Install cc-test-reporter - if: ${{ steps.get_file_path.outputs.shell_file_path }} - env: - CC_TEST_REPORTER_URL: https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 - run: | - curl -sSL "$CC_TEST_REPORTER_URL" > ./cc-test-reporter - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build - - name: shellspec test if: ${{ steps.get_file_path.outputs.shell_file_path }} run: | make scripts-test - - name: Run shellspec and upload coverage (Coveralls) - if: ${{ steps.get_file_path.outputs.shell_file_path }} - env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - run: | - sudo ./shellspec --task fixture:stat:prepare - ./shellspec --shell bash --kcov --kcov-options "--coveralls-id=${COVERALLS_REPO_TOKEN}" - - - name: Upload coverage (Codecov) + - name: Upload coverage if: ${{ steps.get_file_path.outputs.shell_file_path }} env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | bash <(curl -s https://codecov.io/bash) -s coverage - - name: Upload coverage (Code Climate) - if: ${{ steps.get_file_path.outputs.shell_file_path }} - env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - run: | - ./cc-test-reporter format-coverage coverage/cobertura.xml -t cobertura - ./cc-test-reporter upload-coverage