Update release-drafter/release-drafter action to v7 (#143) #238
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: Test shell | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| - 'feature/**' | |
| workflow_dispatch: | |
| inputs: | |
| enable_terminal: | |
| type: boolean | |
| description: 'Enable terminal session.' | |
| required: false | |
| default: false | |
| env: | |
| BATS_LIB_PATH: "./node_modules" | |
| jobs: | |
| test-shell: | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - ubuntu-22.04 | |
| - ubuntu-24.04 | |
| - macos-14 | |
| - macos-15 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Install current Bash on macOS | |
| if: startsWith(matrix.os, 'macos-') | |
| run: brew install bash | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Setup sh-checker | |
| uses: luizm/action-sh-checker@v0.10.0 | |
| if: matrix.os == 'ubuntu-latest' | |
| env: | |
| SHFMT_OPTS: -i 2 -ci -s -d | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Install Kcov | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| KCOV_VERSION=v43 && \ | |
| sudo apt update && \ | |
| sudo apt install -y git cmake g++ libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev binutils-dev && \ | |
| git clone https://github.com/SimonKagstrom/kcov.git && \ | |
| cd kcov && git checkout ${KCOV_VERSION} && mkdir build && cd build && \ | |
| cmake .. && make && sudo make install && \ | |
| kcov --version | |
| - 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 | |
| shell: bash | |
| - name: Upload coverage reports to Codecov | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| directory: ./coverage | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Run Tests on other OSes | |
| if: matrix.os != 'ubuntu-latest' | |
| run: ./node_modules/.bin/bats tests | |
| shell: bash | |
| - name: Setup tmate session | |
| if: ${{ !cancelled() && github.event.inputs.enable_terminal }} | |
| uses: mxschmitt/action-tmate@v3 | |
| timeout-minutes: 20 |