Skip to content

Commit

Permalink
Set up CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdabbs committed Mar 28, 2021
1 parent 129d8be commit c173196
Show file tree
Hide file tree
Showing 15 changed files with 16,563 additions and 7,030 deletions.
25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module'
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier'
],
root: true,
env: {
node: true,
jest: true
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
// '@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-empty-function': 'off',
}
}
19 changes: 0 additions & 19 deletions .eslintrc.json

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test
on:
push:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: bahmutov/npm-install@v1
- name: Lint
run: npm run lint:check
- name: Formatting
run: npm run fmt:check

test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: bahmutov/npm-install@v1
- name: Test
run: npm run test:cov
- name: Report coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: bahmutov/npm-install@v1
- name: Build
run: npm run build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage/
dist/
node_modules
.vscode-test/
Expand Down
2 changes: 1 addition & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.vscode/**
.vscode-test/**
out/test/**
src/**
.gitignore
.yarnrc
Expand All @@ -9,4 +8,5 @@ vsc-extension-quickstart.md
**/.eslintrc.json
**/*.map
**/*.ts
**/*.test.*
node_modules/
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<h2 align="center">π-Base VSCode Extension</h2>
<div align="center">

[![Test](https://github.com/pi-base/vscode/workflows/Test/badge.svg?branch=main)](https://github.com/pi-base/vscode/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/pi-base/vscode/branch/main/graph/badge.svg?token=7JO1N1OXJB)](https://codecov.io/gh/pi-base/vscode)
[![Release](https://github.com/pi-base/vscode/workflows/Release/badge.svg?branch=main)](https://github.com/pi-base/vscode/actions/workflows/release.yml)
[![Version](https://vsmarketplacebadge.apphb.com/version/pi-base.pi-base.svg)](https://marketplace.visualstudio.com/items?itemName=pi-base.pi-base)

TODO: fill this out .
<div align="center">
20 changes: 20 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
bail: 10,
clearMocks: true,
coverageDirectory: "coverage",
coveragePathIgnorePatterns: [
"/node_modules/"
],
coverageProvider: "v8",
errorOnDeprecated: true,
notify: true,
notifyMode: "failure-change",
resetMocks: true,
testRegex: '^.+\\.test\\.ts$',
transform: {
'^.+\\.ts$': 'ts-jest'
},
transformIgnorePatterns: [
"/node_modules/",
],
};

0 comments on commit c173196

Please sign in to comment.