Skip to content

Commit

Permalink
add lint checker
Browse files Browse the repository at this point in the history
Signed-off-by: Hannah Bollar <[email protected]>
  • Loading branch information
hanbollar committed Nov 13, 2023
1 parent 42f4cf3 commit bcaa8db
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Check MRjs has been linted
name: npm format

on:
workflow_dispatch:
push:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
# needs: build # todo
steps:
- uses: actions/checkout@v2

# todo - run the npm install with a dockerfile setup instead of pure
# install but not important to do right now since install isnt too long

- uses: actions/setup-node@v2
with:
node-version: 18

# todo - are the dependencies needed for lint?

- name: Install Dependencies
run: |
npm install
- name: 👷 Format
run: npm format

- name: Error if there are changed files
run: |
# Get the list of changed files
changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
# Print the changed files
echo "Changed files:"
echo "$changed_files"
# Check if there are any changed files
if [ -n "$changed_files" ]; then
echo "There are changed files. Perform your actions here."
else
echo "No changed files. Skip further actions."
fi
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Test MRjs and confirm everything passes
# Run MRjs testing
name: npm test

on:
Expand Down

0 comments on commit bcaa8db

Please sign in to comment.