Add uncommited workflow (#17)
This commit is contained in:
parent
ad11d1ec00
commit
dbf8569adf
|
@ -27,11 +27,3 @@ jobs:
|
||||||
-
|
-
|
||||||
name: Test
|
name: Test
|
||||||
run: npm run test
|
run: npm run test
|
||||||
-
|
|
||||||
name: Check for uncommitted changes
|
|
||||||
# Ensure no changes, but ignore node_modules dir since dev/fresh ci deps installed.
|
|
||||||
run: |
|
|
||||||
git diff --exit-code --stat -- . ':!node_modules' \
|
|
||||||
|| (echo "##[error] found changed files after build. please 'npm run build && npm run format'" \
|
|
||||||
"and check in all changes" \
|
|
||||||
&& exit 1)
|
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
name: uncommited
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
changes:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
# https://github.com/actions/checkout
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
-
|
||||||
|
name: Build
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
npm run format
|
||||||
|
npm prune --production
|
||||||
|
-
|
||||||
|
name: Check for uncommitted changes
|
||||||
|
run: |
|
||||||
|
if [[ `git status --porcelain` ]]; then
|
||||||
|
echo "##[error] found changed files after build. please 'npm run build && npm run format && npm prune --production'"
|
||||||
|
fi
|
Loading…
Reference in New Issue