Skip to content

Commit

Permalink
Add linter and minor bug fixes (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlighter authored Feb 5, 2021
1 parent 61e2f6e commit 882a93d
Show file tree
Hide file tree
Showing 74 changed files with 1,539 additions and 707 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit 882a93d

Please sign in to comment.