Skip to content

Commit

Permalink
fix: Remove build from GitHub actions, and run lint and test in paral…
Browse files Browse the repository at this point in the history
…lel (#131)

* Remove build from GitHub actions, and run lint and test in parallel

* Fix broken GH Workflow

* Wrap Node version in array

* Only run GitHub Actions using Node 12

* Change to using npm ci in build

* Try combing build scripts into stages

* Run one script per step

* Fix duplicate job naming

* Improve name of GitHub Actions job

* Add friendly name for job

* Install semipretty and fix all linting issues
  • Loading branch information
robhowell committed Aug 23, 2019
1 parent abbfb78 commit 034d22b
Show file tree
Hide file tree
Showing 12 changed files with 249 additions and 154 deletions.
21 changes: 12 additions & 9 deletions .eslintrc.js
@@ -1,13 +1,16 @@
module.exports = {
extends: ['airbnb', 'plugin:jest/recommended'],
plugins: ['jest'],
rules: {
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': 'off',
"comma-dangle": ["error", "never"],
"max-len": ["error", 120]
extends: [
"semipretty",
"plugin:jest/recommended",
"plugin:react/recommended"
],
plugins: ["jest"],
settings: {
react: {
version: "detect"
}
},
'env': {
'jest/globals': true
rules: {
"react/react-in-jsx-scope": "off"
}
};
32 changes: 15 additions & 17 deletions .github/workflows/nodejs.yml
Expand Up @@ -3,22 +3,20 @@ name: Node CI
on: [push]

jobs:
build:

build-lint-and-test:
name: Build, lint and test
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm test
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install (ci)
run: npm ci
- name: Build
run: npm build
- name: Lint
run: npm run lint
- name: Unit tests
run: npm test

1 comment on commit 034d22b

@vercel
Copy link

@vercel vercel bot commented on 034d22b Aug 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.