-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Hannah Bollar <[email protected]>
- Loading branch information
Showing
2 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
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 | ||
This file contains 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
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: | ||
|