Skip to content

Commit

Permalink
✅ Add snapshot test support for @spyglassmc/core
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
SPGoding committed Dec 29, 2020
1 parent 2fc1f75 commit 07c6179
Show file tree
Hide file tree
Showing 27 changed files with 1,479 additions and 655 deletions.
4 changes: 1 addition & 3 deletions .editorconfig
Expand Up @@ -5,7 +5,5 @@ root = true

charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = false
3 changes: 1 addition & 2 deletions .eslintignore
@@ -1,4 +1,3 @@
**/test/**/*.ts
**/webpack.config.js

**/dist/**.*
Expand All @@ -7,4 +6,4 @@

/packages/mcschema/**/*.*

.eslintrc.js
**/.eslintrc.js
10 changes: 7 additions & 3 deletions .eslintrc.js
@@ -1,13 +1,12 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
"tsconfigRootDir": __dirname,
"project": "./packages/**/tsconfig.json"
},
"plugins": [
"@typescript-eslint"
Expand Down Expand Up @@ -39,6 +38,11 @@ module.exports = {
"warn",
"never"
],
"@typescript-eslint/indent": [
"warning",
"tab"
],
"indent": "off",
"comma-dangle": "warn",
"eol-last": "warn",
"no-fallthrough": "warn",
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/test-and-release.yml
Expand Up @@ -19,25 +19,33 @@ jobs:
uses: actions/checkout@v2

- name: Cache Node Modules
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-
- name: Cache Build Info
uses: actions/cache@v2
with:
path: |
**/*.tsbuildinfo
key: ${{ runner.os }}-tsbuildinfo
restore-keys: |
${{ runner.os }}-tsbuildinfo
${{ runner.os }}-
- name: Install Dependencies
run: |
npm i
npm run bootstrap
npm run init
npm run build
- name: Test
run: |
npm test
npm run codecov
- name: Release
run: |
npm run build
npm run release
run: npm run release
16 changes: 13 additions & 3 deletions .github/workflows/test.yml
Expand Up @@ -20,18 +20,28 @@ jobs:
uses: actions/checkout@v2

- name: Cache Node Modules
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-
- name: Cache Build Info
uses: actions/cache@v2
with:
path: |
**/*.tsbuildinfo
key: ${{ runner.os }}-tsbuildinfo
restore-keys: |
${{ runner.os }}-tsbuildinfo
${{ runner.os }}-
- name: Install Dependencies
run: |
npm i
npm run bootstrap
npm run init
npm run build
- name: Test
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,6 +4,7 @@
**/*.tsbuildinfo

/packages/*/lib
/packages/*/test-out

/packages/vscode-datapack/dist
/packages/vscode-datapack/out
Expand Down
5 changes: 1 addition & 4 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 07c6179

Please sign in to comment.