Adding super simple lint Action

This commit is contained in:
Chris Raynor 2020-09-14 10:51:29 +01:00
parent cb51c857fc
commit 7bdf90af87
No known key found for this signature in database
GPG key ID: 579A1FBC36FDA261

View file

@ -3,11 +3,19 @@ name: "PR checks"
on: [push, pull_request]
jobs:
lint-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Lint
run: npm run-script lint
check-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Check generated JavaScript
run: |
# Sanity check that repo is clean to start with
@ -33,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Check node modules up to date
run: |
# Sanity check that repo is clean to start with
@ -42,7 +50,6 @@ jobs:
>&2 echo "Failed: Repo should be clean before testing!"
exit 1
fi
# Reinstall modules and then clean to remove absolute paths
# Use 'npm ci' instead of 'npm install' as this is intended to be reproducible
npm ci
@ -55,7 +62,7 @@ jobs:
exit 1
fi
echo "Success: node_modules are up to date"
npm-test:
strategy:
matrix:
@ -63,6 +70,6 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: npm run-script test
run: npm run-script test