change branch name #1
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
| # ------------------------------------------------------------------------------ | |
| # OraDBA - Oracle Database Infrastructure and Security, 5630 Muri, Switzerland | |
| # ------------------------------------------------------------------------------ | |
| # Name.......: test.yml | |
| # Author.....: Stefan Oehrli (oes) stefan.oehrli@oradba.ch | |
| # Editor.....: Stefan Oehrli | |
| # Date.......: 2025.12.12 | |
| # Version....: v4.0.0 | |
| # Purpose....: Unit tests (BATS) and quick integration checks | |
| # Notes......: Triggered on pull_request and push to master/dev | |
| # Reference..: https://github.com/oehrlis/oudbase | |
| # License....: Apache License Version 2.0, January 2004 as shown | |
| # at http://www.apache.org/licenses/ | |
| # ------------------------------------------------------------------------------ | |
| # Modified...: | |
| # see git revision history with git log for more information on changes | |
| # ------------------------------------------------------------------------------ | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| - dev | |
| jobs: | |
| bats-unit: | |
| name: BATS Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y ca-certificates curl git | |
| # Install bats-core | |
| BATS_VERSION="v1.11.0" | |
| git clone --depth 1 --branch ${BATS_VERSION} https://github.com/bats-core/bats-core.git /tmp/bats-core | |
| cd /tmp/bats-core && sudo ./install.sh /usr/local | |
| - name: Run unit tests (test/bats) | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| make test || (echo "Unit tests failed" && exit 1) | |
| - name: Upload test logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bats-unit-logs | |
| path: test/bats || . |