Skip to content

Commit

Permalink
Merge pull request #3 from Fitbit/lmcloughlin/ci
Browse files Browse the repository at this point in the history
Enable GitHub Actions CI
  • Loading branch information
Hexxeh authored Aug 1, 2022
2 parents a56f2d6 + ed286ba commit 0a5f35c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @Fitbit/developer-tools
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node_version: [14, 16, 18]
name: ${{ matrix.os }} / Node v${{ matrix.node_version }}
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Check code style (tsc + eslint)
run: yarn lint
- name: Check code style (Prettier)
run: yarn checkstyle
- name: Run tests
run: yarn test --coverage
- name: Upload coverage
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"build": "rm -rf lib && tsc",
"prettier": "prettier \"**/*.{ts,tsx,json}\"",
"format": "yarn prettier --write",
"lint": "yarn prettier -c && tsc --noEmit && eslint '**/*.{js,ts}' --fix",
"lint": "tsc --noEmit && eslint . --fix",
"checkstyle": "yarn prettier -c",
"test": "jest",
"test:coveralls": "yarn lint && jest --coverage --coverageReporters=text-lcov | coveralls",
"prepublishOnly": "yarn lint && yarn test && yarn build",
Expand Down

0 comments on commit 0a5f35c

Please sign in to comment.