From dbf8569adf70a0757b1732fa18da11793857c99a Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 20 Oct 2019 05:04:25 +0200 Subject: [PATCH] Add uncommited workflow (#17) --- .github/workflows/test.yml | 8 -------- .github/workflows/uncommited.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/uncommited.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b2d0850..395d1e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,11 +27,3 @@ jobs: - name: 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) diff --git a/.github/workflows/uncommited.yml b/.github/workflows/uncommited.yml new file mode 100644 index 0000000..14d4e34 --- /dev/null +++ b/.github/workflows/uncommited.yml @@ -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