Skip to content

Commit 0a5f35c

Browse files
authored
Merge pull request #3 from Fitbit/lmcloughlin/ci
Enable GitHub Actions CI
2 parents a56f2d6 + ed286ba commit 0a5f35c

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @Fitbit/developer-tools

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
build:
12+
strategy:
13+
matrix:
14+
os: [macos-latest, ubuntu-latest, windows-latest]
15+
node_version: [14, 16, 18]
16+
name: ${{ matrix.os }} / Node v${{ matrix.node_version }}
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- run: git config --global core.autocrlf false
20+
- uses: actions/checkout@v2
21+
- uses: actions/setup-node@v2
22+
with:
23+
node-version: ${{ matrix.node_version }}
24+
cache: yarn
25+
- name: Install dependencies
26+
run: yarn install --immutable
27+
- name: Check code style (tsc + eslint)
28+
run: yarn lint
29+
- name: Check code style (Prettier)
30+
run: yarn checkstyle
31+
- name: Run tests
32+
run: yarn test --coverage
33+
- name: Upload coverage
34+
uses: coverallsapp/github-action@v1.1.1
35+
with:
36+
github-token: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"build": "rm -rf lib && tsc",
1414
"prettier": "prettier \"**/*.{ts,tsx,json}\"",
1515
"format": "yarn prettier --write",
16-
"lint": "yarn prettier -c && tsc --noEmit && eslint '**/*.{js,ts}' --fix",
16+
"lint": "tsc --noEmit && eslint . --fix",
17+
"checkstyle": "yarn prettier -c",
1718
"test": "jest",
1819
"test:coveralls": "yarn lint && jest --coverage --coverageReporters=text-lcov | coveralls",
1920
"prepublishOnly": "yarn lint && yarn test && yarn build",

0 commit comments

Comments
 (0)