Update main.yml #1
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: Plain JS CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Lint JavaScript files | |
run: | | |
for file in $(find . -name "*.js"); do | |
echo "Checking $file for syntax errors..." | |
node -c $file || exit 1 | |
done | |
- name: Verify text files | |
run: | | |
for file in $(find . -name "*.txt"); do | |
echo "Verifying $file exists..." | |
if [ ! -f "$file" ]; then exit 1; fi | |
done |