Change YAML file extension.
This commit is contained in:
44
.gitea/workflows/validate.yml
Normal file
44
.gitea/workflows/validate.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Validate Script
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '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 cli/cli
|
||||
Reference in New Issue
Block a user