Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Techbot121 committed Mar 4, 2024
2 parents e2b6390 + 9aee0a9 commit d8e979b
Show file tree
Hide file tree
Showing 852 changed files with 79,437 additions and 50,080 deletions.
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ root = true
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_style = space
trim_trailing_whitespace = true
max_line_length = 100

[*.md]
trim_trailing_whitespace = false
Expand Down
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# .git-blame-ignore-revs
#
# Run stylua formatter on entire codebase
df7bf4216cf31d680c0d95bd576e46193ce2dcd6
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
## Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
## Describe the solution you'd like
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
## Additional context
Add any other context or screenshots about the feature request here.
16 changes: 0 additions & 16 deletions .github/stale.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/cd.yml

This file was deleted.

62 changes: 35 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,60 @@
name: CI

env:
GLUALINT_VERSION: 1.24.2
NEODOC_VERSION: 0.1.4
GLUALINT_VERSION: 1.26.0
NEODOC_VERSION: 0.1.6
STYLUA_VERSION: 0.20.0

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download & extract glualint
run: |
wget -c https://github.com/FPtje/GLuaFixer/releases/download/${GLUALINT_VERSION}/glualint-${GLUALINT_VERSION}-x86_64-linux.zip -O glualint.zip
unzip -u glualint.zip
rm glualint.zip
- name: Download & extract glualint
run: |
wget -c https://github.com/FPtje/GLuaFixer/releases/download/${GLUALINT_VERSION}/glualint-${GLUALINT_VERSION}-x86_64-linux.zip -O glualint.zip
unzip -u glualint.zip
rm glualint.zip
- name: Check code with glualint
run: ./glualint .
- name: Check code with glualint
run: ./glualint .

style:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.STYLUA_VERSION }}
args: --check .

doc-check:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup .NET Core
run: sudo apt-get install -y mono-complete
- name: Setup .NET Core
run: sudo apt-get install -y mono-complete

- name: Download & extract neodoc
run: |
wget -c https://github.com/TTT-2/NeoDoc/releases/download/v${NEODOC_VERSION}/NeoDoc-v${NEODOC_VERSION}.zip -O neodoc.zip
unzip -u neodoc.zip
rm neodoc.zip
- name: Download & extract neodoc
run: |
wget -c https://github.com/TTT-2/NeoDoc/releases/download/v${NEODOC_VERSION}/NeoDoc-v${NEODOC_VERSION}.zip -O neodoc.zip
unzip -u neodoc.zip
rm neodoc.zip
- name: Check code with neodoc
run: mono NeoDoc.exe .
- name: Check code with neodoc
run: mono NeoDoc.exe .
61 changes: 61 additions & 0 deletions .github/workflows/lang-parser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: LangParser

permissions:
contents: write
pull-requests: write

on:
push:
branches:
- master
workflow_dispatch:

jobs:
update-language-files:
# guard against running on forks as they are probably not setup for this
if: github.repository_owner == 'TTT-2'

runs-on: ubuntu-latest

steps:
- name: Checkout ttt2 repo
uses: actions/checkout@v4
with:
path: ttt2

- name: Checkout language parser repo
uses: actions/checkout@v4
with:
repository: TTT-2/ttt2-language_parser
path: ttt2-language_parser

- name: run language parser
run: python ttt2-language_parser/parse.py --in "$GITHUB_WORKSPACE/ttt2/lua/terrortown/lang" --out "$GITHUB_WORKSPACE/ttt2/lua/terrortown/lang" --base en --ignore chef

- name: generate app token
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Create Pull Request
id: ci-update-language-files
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate-token.outputs.token }}
path: ttt2
add-paths: "lua/terrortown/lang/*.lua"
commit-message: Update language files
branch: ci-update-language-files
title: "Language: Update language files"
body: |
Auto-generated by github actions and the [ttt2-language_parser](https://github.com/TTT-2/ttt2-language_parser)
labels: skip-changelog

- name: Setup PR automerge and squash
run: |
cd ttt2
gh pr merge ci-update-language-files --auto --squash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ Temporary Items
todo.txt
addon.json
*.gma
.luarc.json

ttt2.jpg
32 changes: 32 additions & 0 deletions .luarc.json.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"diagnostics.disable": [
"duplicate-set-field",
"unused-local",
"lowercase-global",
"inject-field",
"undefined-field",
"param-type-mismatch",
"cast-local-type"
],
"diagnostics.globals": [
"GM",
"BaseClass",
"CLGAMEMODEMENU",
"CLGAMEMODESUBMENU",
"CLSCOREMENU",
"EVENT",
"TEXFILTER"
],
"diagnostics.ignoredFiles": "Enable",
"format.enable": false,
"runtime.special": {
"include": "require",
"includeCS": "require"
},
"runtime.version": "Lua 5.1",
"runtime.nonstandardSymbol": [
"continue"
],
"workspace.checkThirdParty": false
}
1 change: 1 addition & 0 deletions .styluaignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lua/terrortown/lang/*.lua
Loading

0 comments on commit d8e979b

Please sign in to comment.