Update workflows (#21)

* Failed if uncommited changes
* Fix virtual env
* Fix lint workflow
* Display changes
This commit is contained in:
CrazyMax 2019-10-23 11:58:41 +02:00 committed by GitHub
parent cfb2730919
commit c35b61573f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 5 deletions

View File

@ -2,19 +2,22 @@ name: lint
on: on:
pull_request: pull_request:
branches:
- master
- releases/*
paths: paths:
- src/* - '.github/workflows/lint.yml'
- 'src/*'
jobs: jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- -
# https://github.com/actions/checkout
name: Checkout name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v1
-
# https://github.com/actions/setup-node
name: Set up Node
uses: actions/setup-node@v1
- -
name: Setup TS name: Setup TS
run: npm install tslint typescript -g run: npm install tslint typescript -g

View File

@ -9,9 +9,10 @@ on:
jobs: jobs:
release: release:
runs-on: ubuntu-18.04 runs-on: ubuntu-latest
steps: steps:
- -
# https://github.com/actions/checkout
name: Checkout name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v1
- -
@ -40,6 +41,10 @@ jobs:
if [ -n "${{ steps.prepare.outputs.major_exists }}" ]; then if [ -n "${{ steps.prepare.outputs.major_exists }}" ]; then
git branch --set-upstream-to=origin/releases/${{ steps.prepare.outputs.major_tag }} releases/${{ steps.prepare.outputs.major_tag }} git branch --set-upstream-to=origin/releases/${{ steps.prepare.outputs.major_tag }} releases/${{ steps.prepare.outputs.major_tag }}
fi fi
-
# https://github.com/actions/setup-node
name: Set up Node
uses: actions/setup-node@v1
- -
name: NPM production deps name: NPM production deps
run: | run: |

View File

@ -12,6 +12,10 @@ jobs:
# https://github.com/actions/checkout # https://github.com/actions/checkout
name: Checkout name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v1
-
# https://github.com/actions/setup-node
name: Set up Node
uses: actions/setup-node@v1
- -
name: Build name: Build
run: | run: |
@ -23,5 +27,7 @@ jobs:
name: Check for uncommitted changes name: Check for uncommitted changes
run: | run: |
if [[ `git status --porcelain` ]]; then if [[ `git status --porcelain` ]]; then
git status --porcelain
echo "##[error] found changed files after build. please 'npm run build && npm run format && npm prune --production'" echo "##[error] found changed files after build. please 'npm run build && npm run format && npm prune --production'"
exit 1
fi fi