Add linter and minor bug fixes (#107)

This commit is contained in:
Simon Lecoq
2021-02-05 23:45:48 +01:00
committed by GitHub
parent 61e2f6e1a1
commit 882a93dea5
74 changed files with 1544 additions and 712 deletions

View File

@@ -24,11 +24,27 @@ jobs:
- name: Run tests
run: docker run --workdir=/metrics --entrypoint="" lowlighter/metrics:${{ github.head_ref || 'master' }} npm test
# Run linter to ensure new code respect coding rules
lint:
name: Apply linter
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: 15
- name: Setup metrics
run: npm ci
- name: Run linter
run: npm run linter
# Run CodeQL on branch
analyze:
name: Analyze code
runs-on: ubuntu-latest
needs: [ build ]
needs: [ lint ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
@@ -44,7 +60,7 @@ jobs:
docker-master:
name: Publish master to GitHub registry
runs-on: ubuntu-latest
needs: [ build ]
needs: [ build, lint ]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Checkout repository