-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created GitHub action files to run style guide checker and unit tests…
… of verifyInputProvided() (#59)
- Loading branch information
1 parent
4b439f7
commit e2b1e80
Showing
2 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Style Guide Check of verifyInputProvided() | ||
run-name: ${{ github.actor }} has triggered style guide check of verifyInputProvided() for the ${{ github.run_attempt }} time by initiating a ${{ github.event_name }} | ||
on: [push, workflow_dispatch] | ||
jobs: | ||
style-guide-verifyInputProvided: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checking out ${{ github.ref_type }} ${{ github.ref_name }} from ${{ github.repository_owner }}'s ${{ github.repository }} repo on ${{ runner.os }} because ${{ github.actor }} initiated a ${{ github.event_name }}... | ||
uses: actions/checkout@v3 | ||
- name: Install Style Guide Checking Tool... | ||
uses: ./.github/actions/install-shfmt-via-snap | ||
- name: Running style guide check... | ||
run: shfmt --diff --case-indent --posix ./src/shell/functions/util/verifyInputProvided.sh | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Unit Test verifyInputProvided() | ||
run-name: ${{ github.actor }} has triggered the running of unit tests of verifyInputProvided() for the ${{ github.run_attempt }} time by initiating a ${{ github.event_name }} | ||
on: [push, workflow_dispatch] | ||
jobs: | ||
unit-test-ubuntu-bash-verifyInputProvided: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checking out ${{ github.ref_type }} ${{ github.ref_name }} from ${{ github.repository_owner }}'s ${{ github.repository }} repo on ${{ runner.os }} because ${{ github.actor }} initiated a ${{ github.event_name }}... | ||
uses: actions/checkout@v3 | ||
- name: Install 'Kcov' (test coverage tool) and 'shellspec' (POSIX shell script testing tool)... | ||
uses: ./.github/actions/install-kcov-and-shellspec | ||
- name: Running unit tests from a 'bash' shell (with code coverage) from ${{ github.workspace }}... | ||
run: shellspec --no-fail-fast -p -s /bin/bash --kcov --kcov-options "--include-pattern=src/shell/functions/util/verifyInputProvided.sh --limits=90,100" ./spec/unit/util/verifyInputProvided_* | ||
# TODO #53: Pipeline doesn't process --fail-low-coverage correctly. | ||
## run: shellspec --no-fail-fast -p -s /bin/bash --kcov --kcov-options "--include-pattern=src/shell/functions/util/verifyInputProvided.sh --limits=90,100" --fail-low-coverage ./spec/unit/util/verifyInputProvided_* | ||
unit-test-ubuntu-dash-verifyInputProvided: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checking out ${{ github.ref_type }} ${{ github.ref_name }} from ${{ github.repository_owner }}'s ${{ github.repository }} repo on ${{ runner.os }} because ${{ github.actor }} initiated a ${{ github.event_name }}... | ||
uses: actions/checkout@v3 | ||
- name: Installing 'shellspec' (POSIX shell script testing tool)... | ||
uses: ./.github/actions/install-shellspec | ||
- name: Running unit tests from a 'dash' shell... | ||
run: shellspec --no-fail-fast -s /bin/dash ./spec/unit/util/verifyInputProvided_* | ||
unit-test-ubuntu-zsh-verifyInputProvided: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checking out ${{ github.ref_type }} ${{ github.ref_name }} from ${{ github.repository_owner }}'s ${{ github.repository }} repo on ${{ runner.os }} because ${{ github.actor }} initiated a ${{ github.event_name }}... | ||
uses: actions/checkout@v3 | ||
- name: Installing 'shellspec' (POSIX shell script testing tool)... | ||
uses: ./.github/actions/install-shellspec | ||
- name: Installing 'zsh' (shell)... | ||
uses: ./.github/actions/install-zsh-shell-via-apt | ||
- name: Running unit tests from a 'zsh' shell... | ||
run: shellspec --no-fail-fast -s /bin/zsh ./spec/unit/util/verifyInputProvided_* | ||
unit-test-ubuntu-ksh-verifyInputProvided: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checking out ${{ github.ref_type }} ${{ github.ref_name }} from ${{ github.repository_owner }}'s ${{ github.repository }} repo on ${{ runner.os }} because ${{ github.actor }} initiated a ${{ github.event_name }}... | ||
uses: actions/checkout@v3 | ||
- name: Installing 'shellspec' (POSIX shell script testing tool)... | ||
uses: ./.github/actions/install-shellspec | ||
- name: Installing 'ksh' (shell)... | ||
uses: ./.github/actions/install-ksh-shell-via-apt-get | ||
- name: Running unit tests from a 'ksh' shell... | ||
run: shellspec --no-fail-fast -s /bin/ksh ./spec/unit/util/verifyInputProvided_* | ||
unit-test-macos-bash-verifyInputProvided: | ||
runs-on: macos-12 | ||
steps: | ||
- name: Checking out ${{ github.ref_type }} ${{ github.ref_name }} from ${{ github.repository_owner }}'s ${{ github.repository }} repo on ${{ runner.os }} because ${{ github.actor }} initiated a ${{ github.event_name }}... | ||
uses: actions/checkout@v3 | ||
- name: Installing 'shellspec' (POSIX shell script testing tool)... | ||
uses: ./.github/actions/install-shellspec | ||
- name: Running unit tests from a 'bash' shell (with code coverage) from ${{ github.workspace }}... | ||
run: $HOME/.local/bin/shellspec --no-fail-fast -s /bin/bash ./spec/unit/util/verifyInputProvided_* | ||
unit-test-macos-dash-verifyInputProvided: | ||
runs-on: macos-12 | ||
steps: | ||
- name: Checking out ${{ github.ref_type }} ${{ github.ref_name }} from ${{ github.repository_owner }}'s ${{ github.repository }} repo on ${{ runner.os }} because ${{ github.actor }} initiated a ${{ github.event_name }}... | ||
uses: actions/checkout@v3 | ||
- name: Installing 'shellspec' (POSIX shell script testing tool)... | ||
uses: ./.github/actions/install-shellspec | ||
- name: Running unit tests from a 'dash' shell... | ||
run: $HOME/.local/bin/shellspec --no-fail-fast -s /bin/dash ./spec/unit/util/verifyInputProvided_* | ||
unit-test-macos-zsh-verifyInputProvided: | ||
runs-on: macos-12 | ||
steps: | ||
- name: Checking out ${{ github.ref_type }} ${{ github.ref_name }} from ${{ github.repository_owner }}'s ${{ github.repository }} repo on ${{ runner.os }} because ${{ github.actor }} initiated a ${{ github.event_name }}... | ||
uses: actions/checkout@v3 | ||
- name: Installing 'shellspec' (POSIX shell script testing tool)... | ||
uses: ./.github/actions/install-shellspec | ||
- name: Running unit tests from a 'zsh' shell... | ||
run: $HOME/.local/bin/shellspec --no-fail-fast -s /bin/zsh ./spec/unit/util/verifyInputProvided_* | ||
|