Skip to content

Commit 4a24629

Browse files
committed
Set up CI workflow
1 parent 129d8be commit 4a24629

File tree

16 files changed

+16591
-7030
lines changed

16 files changed

+16591
-7030
lines changed

.eslintrc.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: 'tsconfig.json',
5+
sourceType: 'module'
6+
},
7+
plugins: ['@typescript-eslint/eslint-plugin'],
8+
extends: [
9+
'plugin:@typescript-eslint/eslint-recommended',
10+
'plugin:@typescript-eslint/recommended',
11+
'prettier'
12+
],
13+
root: true,
14+
env: {
15+
node: true,
16+
jest: true
17+
},
18+
rules: {
19+
'@typescript-eslint/interface-name-prefix': 'off',
20+
// '@typescript-eslint/explicit-function-return-type': 'error',
21+
'@typescript-eslint/explicit-module-boundary-types': 'off',
22+
'@typescript-eslint/no-explicit-any': 'error',
23+
'@typescript-eslint/no-empty-function': 'off',
24+
}
25+
}

.eslintrc.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/codeql.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: "16 23 * * 2"
12+
13+
jobs:
14+
analyze:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
- name: Initialize CodeQL
20+
uses: github/codeql-action/init@v1
21+
with:
22+
languages: javascript
23+
- name: Autobuild
24+
uses: github/codeql-action/autobuild@v1
25+
- name: Perform CodeQL Analysis
26+
uses: github/codeql-action/analyze@v1

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test
2+
on:
3+
push:
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v2
11+
- uses: bahmutov/npm-install@v1
12+
- name: Lint
13+
run: npm run lint:check
14+
- name: Formatting
15+
run: npm run fmt:check
16+
17+
test:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
- uses: bahmutov/npm-install@v1
23+
- name: Test
24+
run: npm run test:cov
25+
- name: Report coverage
26+
uses: codecov/codecov-action@v1
27+
with:
28+
token: ${{ secrets.CODECOV_TOKEN }}
29+
file: ./coverage/lcov.info
30+
fail_ci_if_error: true
31+
32+
build:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v2
37+
- uses: bahmutov/npm-install@v1
38+
- name: Build
39+
run: npm run build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
coverage/
12
dist/
23
node_modules
34
.vscode-test/

.vscodeignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.vscode/**
22
.vscode-test/**
3-
out/test/**
43
src/**
54
.gitignore
65
.yarnrc
@@ -9,4 +8,5 @@ vsc-extension-quickstart.md
98
**/.eslintrc.json
109
**/*.map
1110
**/*.ts
11+
**/*.test.*
1212
node_modules/

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<h2 align="center">π-Base VSCode Extension</h2>
2+
<div align="center">
3+
4+
[![Test](https://github.com/pi-base/vscode/workflows/Test/badge.svg?branch=main)](https://github.com/pi-base/vscode/actions/workflows/test.yml)
5+
[![codecov](https://codecov.io/gh/pi-base/vscode/branch/main/graph/badge.svg?token=7JO1N1OXJB)](https://codecov.io/gh/pi-base/vscode)
16
[![Release](https://github.com/pi-base/vscode/workflows/Release/badge.svg?branch=main)](https://github.com/pi-base/vscode/actions/workflows/release.yml)
7+
[![Version](https://vsmarketplacebadge.apphb.com/version/pi-base.pi-base.svg)](https://marketplace.visualstudio.com/items?itemName=pi-base.pi-base)
28

3-
TODO: fill this out .
9+
<div align="center">

jest.config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
bail: 10,
3+
clearMocks: true,
4+
coverageDirectory: "coverage",
5+
coveragePathIgnorePatterns: [
6+
"/node_modules/"
7+
],
8+
coverageProvider: "v8",
9+
errorOnDeprecated: true,
10+
notify: true,
11+
notifyMode: "failure-change",
12+
resetMocks: true,
13+
testRegex: '^.+\\.test\\.ts$',
14+
transform: {
15+
'^.+\\.ts$': 'ts-jest'
16+
},
17+
transformIgnorePatterns: [
18+
"/node_modules/",
19+
],
20+
};

0 commit comments

Comments
 (0)