diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f564032 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,40 @@ +name: Test + +on: + push: + branches: + - main + - develop + pull_request: + branches: + - main + - develop + workflow_dispatch: + +jobs: + test: + name: Run ShellSpec Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install ShellSpec + run: | + curl -fsSL https://git.io/shellspec | sh -s -- --yes + sudo ln -s ${HOME}/.local/lib/shellspec/shellspec /usr/local/bin/shellspec + + - name: Verify ShellSpec installation + run: shellspec --version + + - name: Run ShellSpec tests + run: shellspec --format documentation + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: shellspec-results + path: report/ + retention-days: 30