Skip to content

Commit

Permalink
chore: use github action instead of circleci (#27)
Browse files Browse the repository at this point in the history
* chore: use github action instead of circleci

* chore: fix install command in ci

* chore: use Codecov github action
  • Loading branch information
thundermiracle authored Jun 2, 2022
1 parent 58f3bcc commit fde9ae9
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 66 deletions.
60 changes: 0 additions & 60 deletions .circleci/config.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'CI'

on:
push:
branches:
- main
pull_request:
types: ['opened', 'edited', 'synchronize']

jobs:
test:
name: 'Test in: ${{ matrix.os }}, node-${{ matrix.node }}'
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [12, 14, 16]

steps:
- name: checkout
uses: actions/checkout@v3

- name: set up node.js v${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: "yarn"

- name: cache node_modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}

- name: install dependencies
run: yarn install

- name: test
run: yarn test

- name: build
run: yarn build

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
},
"homepage": "https://github.com/thundermiracle/filter-data#readme",
"scripts": {
"eslint:src": "eslint src/**/*.{ts,tsx}",
"eslint:test": "eslint __test__/**/*.{ts,tsx}",
"eslint:src": "eslint src/**/*.ts",
"eslint:test": "eslint __test__/**/*.ts",
"eslint": "yarn eslint:src && yarn eslint:test",
"jest": "jest",
"type-check": "tsc --noEmit --project tsconfig.eslint.json",
"type-check:watch": "yarn type-check -- --watch",
"test": "yarn type-check && yarn eslint && yarn jest && codecov",
"test": "yarn type-check && yarn eslint && yarn jest",
"bench": "ts-node ./benchmark/index.ts",
"build:js:cjs": "tsc",
"build:js:es": "tsc --project tsconfig.es.json",
Expand All @@ -55,7 +55,6 @@
"@types/ramda": "^0.26.44",
"@typescript-eslint/eslint-plugin": "^2.23.0",
"@typescript-eslint/parser": "^2.23.0",
"codecov": "^3.6.5",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-config-prettier": "^6.10.0",
Expand All @@ -77,4 +76,4 @@
"ts-node": "^8.6.2",
"typescript": "^3.8.3"
}
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"outDir": "./lib/",
"sourceMap": false,
"sourceMap": true,
"target": "es5",
"module": "CommonJS",
"declaration": true,
Expand Down

0 comments on commit fde9ae9

Please sign in to comment.