-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from bjcscat/luals-annotations
Merge corrected LuaLS annotation code
- Loading branch information
Showing
18 changed files
with
1,003 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: LuaLS Annotations | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
deploy-annotations: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- run: npm install | ||
|
||
- name: Build LuaLS-annotations | ||
run: npm run build:luals-annotations | ||
|
||
- name: Generate annotations | ||
run: npm run annotate:luals -- /tmp/annotations.lua | ||
|
||
- name: Checkout to new branch | ||
run: | | ||
git checkout luals-annotations || git checkout --orphan luals-annotations && git rm --cached -r . | ||
- name: Pull changes | ||
run: git pull origin luals-annotations | ||
|
||
- name: Copy annotations | ||
run: cp /tmp/annotations.lua . | ||
|
||
- name: Push annotations | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
add: "annotations.lua" | ||
default_author: github_actions | ||
message: "update annotations" | ||
new_branch: luals-annotations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Pull request created or updated | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
lest: | ||
uses: "./.github/workflows/lest.yml" | ||
# Only run on forks to avoid duplicating the "push" workflow | ||
if: ${{ github.event.pull_request.head.repo.fork }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Push to feature branch | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
|
||
jobs: | ||
lest: | ||
uses: ./.github/workflows/lest.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
packages/**/dist | ||
node_modules | ||
packages/**/coverage | ||
.idea/discord.xml | ||
*.tsbuildinfo |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./dist" | ||
"outDir": "./dist", | ||
"composite": true | ||
}, | ||
"include": ["src/**/*.ts"] | ||
"include": ["src/**/*.ts", "src/**/*.json"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
module.exports = { | ||
preset: "ts-jest", | ||
testEnvironment: "node", | ||
testMatch: ["**/*.test.ts"], | ||
collectCoverage: true, | ||
collectCoverageFrom: ["src/**/{!(index),}.ts"], | ||
coverageThreshold: { | ||
global: { | ||
lines: 100, | ||
branches: 100, | ||
functions: 100, | ||
statements: 100, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "@lest/luals-annotations", | ||
"description": "Package to automatically create LuaLS annotations for Lest", | ||
"main": "dist/index", | ||
"scripts": { | ||
"start:ts-node": "ts-node src/index.ts", | ||
"start": "node dist/index.js", | ||
"dev": "npm run --debug start:ts-node && onchange \"src/**/*.ts\" -- npm run --debug start:ts-node", | ||
"build": "tsc --build tsconfig.build.json", | ||
"test": "jest" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^29.5.2", | ||
"jest": "^29.5.0", | ||
"onchange": "^7.1.0", | ||
"ts-jest": "^29.1.0", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^5.1.3" | ||
}, | ||
"dependencies": { | ||
"@lest/docs": "*" | ||
} | ||
} |
Oops, something went wrong.