tests #310
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: tests | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| run_full_integration: | |
| description: Run full integration suite | |
| required: false | |
| default: "false" | |
| type: choice | |
| options: | |
| - "false" | |
| - "true" | |
| schedule: | |
| - cron: "0 3 * * 0" | |
| jobs: | |
| shellcheck: | |
| name: shellcheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install shellcheck | |
| run: sudo apt-get update && sudo apt-get install -y shellcheck | |
| - name: Run shellcheck | |
| run: shellcheck -S error reconftw.sh modules/*.sh lib/*.sh install.sh | |
| unit-fast: | |
| name: unit-fast | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y bats jq | |
| - name: Run unit tests | |
| run: ./tests/run_tests.sh --unit | |
| integration-smoke: | |
| name: integration-smoke | |
| runs-on: ubuntu-latest | |
| needs: | |
| - unit-fast | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y bats jq | |
| - name: Run integration smoke tests | |
| run: ./tests/run_tests.sh --smoke | |
| macos-smoke: | |
| name: macos-smoke | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| brew update | |
| brew install bash bats-core jq coreutils gnu-getopt gnu-sed | |
| - name: Configure GNU toolchain PATH | |
| run: | | |
| BREW_PREFIX="$(brew --prefix)" | |
| echo "$BREW_PREFIX/bin" >> "$GITHUB_PATH" | |
| echo "$BREW_PREFIX/opt/coreutils/libexec/gnubin" >> "$GITHUB_PATH" | |
| echo "$BREW_PREFIX/opt/gnu-getopt/bin" >> "$GITHUB_PATH" | |
| echo "$BREW_PREFIX/opt/gnu-sed/libexec/gnubin" >> "$GITHUB_PATH" | |
| - name: Run unit tests | |
| run: ./tests/run_tests.sh --unit | |
| - name: Run integration smoke tests | |
| run: ./tests/run_tests.sh --smoke | |
| integration-full: | |
| name: integration-full | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.run_full_integration == 'true') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y bats jq | |
| - name: Run full integration tests | |
| run: ./tests/run_tests.sh --integration |