Skip to content
This repository has been archived by the owner on Jul 4, 2020. It is now read-only.

Commit

Permalink
feat(checks): adds spelling, commit lint, notary
Browse files Browse the repository at this point in the history
* feat(ci): uses release notary
* fix(tests): stream timeout needed a longer wait
  • Loading branch information
andrewxhill authored Apr 14, 2020
1 parent a9f8906 commit 3aacd45
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 36 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: publish
on:
release:
types: [published]
push:
tags:
- "v*"
jobs:

publish:
name: publish
runs-on: ubuntu-latest
Expand Down Expand Up @@ -35,3 +35,7 @@ jobs:
run: |
json -I -f package.json -e 'this.version=("${{ steps.latesttag.outputs.tag }}").replace("v", "")'
npm publish --access=public
- name: Release Notary Action
uses: commitsar-app/release-notary@v0.7.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52 changes: 52 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Review
on: [pull_request]
jobs:
eslint:
name: eslint
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Cache
uses: actions/cache@v1
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup
uses: actions/setup-node@v1
with:
node-version: 12

- name: Install
run: npm install

- name: Lint
run: npm run lint

spell-check:
name: spell-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: reviewdog/action-misspell@v1
with:
reporter: github-pr-review
github_token: ${{ secrets.github_token }}
locale: "US"

validate-commits:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Run Commitsar
uses: docker://outillage/commitsar

33 changes: 2 additions & 31 deletions .github/workflows/lint_test.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: lint_test
name: Tests
on:
push:
branches:
Expand All @@ -8,37 +8,8 @@ on:
- master

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Cache
uses: actions/cache@v1
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup
uses: actions/setup-node@v1
with:
node-version: 12

- name: Install
run: npm install

- name: Lint
run: npm run lint

test:
name: Test
name: test
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"test": "npm run test:node && npm run test:browser",
"lint": "eslint --fix --ext .mjs,.js,.jsx,.ts,.tsx src",
"docs": "typedoc && touch ./docs/.nojekyll",
"precommit": "npm run lint && npm test",
"preversion": "npm run docs; npm run precommit",
"release": "npm version patch",
"postversion": "git push --follow-tags",
Expand Down
2 changes: 1 addition & 1 deletion src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ describe('Client', function () {
client.save(dbID, 'Person', [person])
person.age = 40
client.save(dbID, 'Person', [person])
}).timeout(5000) // Make sure our test doesn't timeout
}).timeout(15000) // Make sure our test doesn't timeout
})
describe('Query', () => {
before(async () => {
Expand Down

0 comments on commit 3aacd45

Please sign in to comment.