[lib-common] update lib-common, use TMPDIR if set. #137
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Coverage | |
| on: | |
| schedule: | |
| - cron: '5 4 3 * *' | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '.shellspec' | |
| - 'src/*.sh' | |
| - 'tests/*.sh' | |
| workflow_dispatch: | |
| jobs: | |
| coverage: | |
| name: Run tests coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4.2.0 | |
| - name: Install shellspec | |
| run: | | |
| mkdir -p ~/shellspec | |
| cd ~/shellspec | |
| git clone https://github.com/shellspec/shellspec.git | |
| ln -s ~/shellspec/shellspec/shellspec /usr/local/bin/shellspec | |
| echo -n "shellspec version: " | |
| shellspec --version | |
| - name: Install kcov | |
| run: | | |
| sudo apt update | |
| sudo apt -y install binutils-dev libssl-dev libcurl4-openssl-dev libelf-dev libstdc++-12-dev zlib1g-dev libdw-dev libiberty-dev | |
| git clone https://github.com/SimonKagstrom/kcov.git | |
| cd kcov | |
| mkdir build | |
| cd build | |
| cmake .. | |
| make | |
| sudo make install | |
| echo -n "kcov version: " | |
| kcov --version | |
| - name: Install libraries | |
| run: | | |
| sudo apt install -y inotify-tools | |
| - name: Checkout Code | |
| uses: actions/checkout@v7 | |
| - name: Generate tests coverage reports | |
| run: | | |
| NUM_JOBS=$(ls -1 tests | wc -l) | |
| shellspec -s bash --jobs "${NUM_JOBS}" --kcov | |
| - name: Upload reports | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage | |
| path: coverage | |
| - name: Upload coverage reports to Codecov | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| directory: coverage | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |