All checks were successful
Validate Script / test (push) Successful in 5s
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: Validate Script
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '.gitea/workflows/validate.yml'
|
|
- 'github-release-installer'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Validate Script
|
|
run: |
|
|
# Check if the script is executable
|
|
if [ ! -x github-release-installer ]; then
|
|
echo "Error: github-release-installer is not executable."
|
|
exit 1
|
|
fi
|
|
- name: Syntax Check
|
|
run: |
|
|
# Check the syntax of the script
|
|
if ! bash -n github-release-installer; then
|
|
echo "Error: Syntax errors found in github-release-installer."
|
|
exit 1
|
|
fi
|
|
- name: Help Option Check
|
|
run: |
|
|
# Run the script with --help to check for basic functionality
|
|
if ! ./github-release-installer --help > /dev/null; then
|
|
echo "Error: github-release-installer did not run successfully."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Github CLI Release List Check
|
|
run: |
|
|
./github-release-installer -l cli/cli
|
|
|
|
- name: Github CLI Install Check
|
|
run: |
|
|
./github-release-installer -t archive -b gh cli/cli
|