Skip to content

Commit

Permalink
Merge aad504b into b40febb
Browse files Browse the repository at this point in the history
  • Loading branch information
colin969 committed Jun 18, 2020
2 parents b40febb + aad504b commit 10e5ff5
Show file tree
Hide file tree
Showing 128 changed files with 1,016 additions and 1,097 deletions.
53 changes: 52 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,68 @@
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"@typescript-eslint"
"react",
"@typescript-eslint",
"only-warn"
],
"settings": {
"react": {
"version": "detect"
}
},
"root": true,
"rules": {
"@typescript-eslint/adjacent-overload-signatures": "off",
"@typescript-eslint/ban-types": ["warn", {
"types": {
"{}": false
},
"extendDefaults": true
}],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/indent": ["warn", 2, {
"MemberExpression": 0,
"SwitchCase": 1
}],
"@typescript-eslint/no-empty-function": ["warn", { "allow": ["arrowFunctions"] }],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-invalid-void-type": ["warn", { "allowInGenericTypeArguments": true }],
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-unused-vars": ["warn", {
"vars": "all",
"args": "none"
}],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/prefer-interface": "off",
//"react/no-access-state-in-setstate": "warn", (requires restructuring of "app.tsx")
"react/no-direct-mutation-state": "warn",
"react/no-render-return-value": "warn",
"react/no-string-refs": "warn",
"react/no-unescaped-entities": ["warn", {"forbid": [{
"char": ">",
"alternatives": [">"]
}, {
"char": "}",
"alternatives": ["}"]
}]}],
"react/no-unused-prop-types": "warn",
"react/no-unused-state": "warn",
"curly": ["warn", "all"],
"eol-last": "warn",
"for-direction": "warn",
"getter-return": "warn",
"keyword-spacing": "warn",
"no-compare-neg-zero": "warn",
"no-cond-assign": "warn",
"no-constant-condition": ["warn", { "checkLoops": false }],
"no-control-regex": "off",
"no-debugger": "warn",
"no-delete-var": "warn",
"no-dupe-args": "warn",
Expand All @@ -41,6 +91,7 @@
"no-extra-semi": "warn",
"no-func-assign": "warn",
"no-global-assign": "warn",
"no-inner-declarations": "off",
"no-invalid-regexp": "warn",
"no-irregular-whitespace": "warn",
"no-mixed-spaces-and-tabs": "warn",
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@ jobs:
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Use Node.js 12.x
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: npm install
node-version: 14.x
- uses: actions/cache@v2
id: cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json') }}
- name: Install Dependencies
run: npm install
if: steps.cache.outputs.cache-hit != 'true'
env:
CI: true
- name: npm build
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,24 @@ jobs:

- uses: actions/checkout@v1

- name: Use Node.js 10.x
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 10.x

- name: npm install
node-version: 14.x
- uses: actions/cache@v2
id: cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json') }}
- name: Install Dependencies
run: npm install

if: steps.cache.outputs.cache-hit != 'true'
env:
CI: true
- name: Run tests
run: npx jest --coverage --coverageReporters=lcov
continue-on-error: true

- name: Coveralls
uses: coverallsapp/github-action@master
with:
Expand Down
92 changes: 15 additions & 77 deletions .github/workflows/latest.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,13 @@
name: Build and Release Status
name: Release Status

on:
push:
branches:
- master

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: npm install
run: npm install
env:
CI: true
- name: npm build
run: npm run build --if-present
env:
CI: true

generate-latest:
name: Update Latest Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Create new latest
uses: EndBug/latest-tag@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged


release:
name: Release
needs: generate-latest
runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -65,42 +22,23 @@ jobs:
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Use Node.js 12.x
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: npm install
node-version: 14.x
- uses: actions/cache@v2
id: cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json') }}
- name: Install Dependencies
run: npm install
if: steps.cache.outputs.cache-hit != 'true'
env:
CI: true
- name: npm release
- name: Build and Release
run: npm run release
- name: Package releases
if: matrix.os != 'macOS-latest'
run: |
7z a dist/flashpoint-launcher_${{ matrix.os }}.zip ./dist/*/*
- name: Package releases (mac)
if: matrix.os == 'macOS-latest'
run: |
zip -r dist/flashpoint-launcher_${{ matrix.os }}.zip ./dist/*/*
- name: Package Setup
if: matrix.os == 'windows-latest'
run: |
mv dist/*.exe dist/FP_Win32_Setup.exe
- name: Upload dist zips to latest release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/flashpoint-launcher_${{ matrix.os }}.zip
asset_name: flashpoint-launcher_${{ matrix.os }}.zip
tag: latest
overwrite: true
- name: Upload setup to latest release
if: matrix.os == 'windows-latest'
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/FP_Win32_Setup.exe
asset_name: FP_Win32_Setup.exe
tag: latest
overwrite: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EP_DRAFT: true
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint

on: pull_request

jobs:
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- uses: actions/cache@v2
id: cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json') }}
- name: Install Dependencies
run: npm install
if: steps.cache.outputs.cache-hit != 'true'
env:
CI: true
- name: eslint
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
fail_on_error: true
eslint_flags: 'src/ tests/ ./gulpfile.js'

0 comments on commit 10e5ff5

Please sign in to comment.