diff --git a/.github/workflows/test-shell.yml b/.github/workflows/test-shell.yml index 565adb5..a44fd2d 100644 --- a/.github/workflows/test-shell.yml +++ b/.github/workflows/test-shell.yml @@ -40,9 +40,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Config Git user. - run: git config --global user.name "Test user" && git config --global user.email "someone@example.com" - - name: Setup Node.js uses: actions/setup-node@v4 with: @@ -58,6 +55,7 @@ jobs: run: npm install - name: Install Kcov + if: matrix.os == 'ubuntu-latest' run: | KCOV_VERSION=v43 && \ sudo apt install -y git cmake g++ libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev binutils-dev && \ @@ -65,11 +63,13 @@ jobs: cd kcov && git checkout ${KCOV_VERSION} && mkdir build && cd build && \ cmake .. && make && sudo make install && \ kcov --version - if: matrix.os == 'ubuntu-latest' - - name: Run Tests and Code Coverage on Ubuntu + - name: Config Git user for tests. + run: git config --global user.name "Test user" && git config --global user.email "someone@example.com" + + - name: Run tests if: matrix.os == 'ubuntu-latest' - run: kcov --clean --include-pattern=.bash --bash-parse-files-in-dir=. --exclude-path=node_modules,vendor,coverage $(pwd)/coverage ./node_modules/.bin/bats tests + run: kcov --clean --include-pattern=.bash --bash-parse-files-in-dir=. --exclude-path=node_modules,vendor,coverage "$(pwd)"/coverage ./node_modules/.bin/bats tests shell: bash - name: Upload coverage reports to Codecov