Skip to content

Commit

Permalink
Initialize project
Browse files Browse the repository at this point in the history
  • Loading branch information
simensen committed May 5, 2020
0 parents commit 05734ec
Show file tree
Hide file tree
Showing 25 changed files with 33,999 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2

[*.{js,ts}]
indent_size = 2

[*.vue]
indent_size = 2
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
lib/
node_modules/
62 changes: 62 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": [
"plugin:github/es6",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.eslint.json"
},
"rules": {
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-ignore": "error",
"camelcase": "off",
"@typescript-eslint/camelcase": "error",
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
//"@typescript-eslint/no-object-literal-type-assertion": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
//"@typescript-eslint/prefer-interface": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"semi": "off",
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
open_collective: dflydev
custom: https://enjoy.gitstore.app/repositories/dflydev/check-runs-action
183 changes: 183 additions & 0 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
name: Build Status
on:
- push

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
#- name: Set up PHP, with Composer and extensions
# uses: shivammathur/setup-php@v2
# with:
# php-version: 7.4
# coverage: pcov
- name: Prepare PHP Checks
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: php
checks: |
[
{ "id": "phpunit", "name": "PHPUnit", "status": "queued" },
{ "id": "psalm", "name": "Psalm", "status": "queued" },
{ "id": "phpcs", "name": "PHP_CodeSniffer", "status": "queued" },
{ "id": "dusk", "name": "Dusk", "status": "queued" }
]
- name: Prepare Node Checks
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: node
checks: |
[
{ "id": "eslint", "name": "ESLint", "status": "queued" },
{ "id": "build", "name": "npm build", "status": "queued" }
]
- name: Report PHPUnit Starting
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: php
id: phpunit
status: in_progress

- name: PHPUnit
id: phpunit
continue-on-error: true
run: |
sleep 5 && false
- name: Report PHPUnit Conclusion
if: always()
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: php
id: phpunit
conclusion: ${{ steps.phpunit.outcome }}

- name: Report PHP_CodeSniffer Starting
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: php
id: phpcs
status: in_progress

- name: PHP_CodeSniffer
id: phpcs
continue-on-error: true
run: |
sleep 2
- name: Report PHP_CodeSniffer Conclusion
if: always()
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: php
id: phpcs
conclusion: ${{ steps.phpcs.outcome }}

- name: Report ESLint Starting
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: node
id: eslint
status: in_progress

- name: ESLint
id: eslint
continue-on-error: true
run: |
sleep 1 && false
- name: Report ESLint Conclusion
if: always()
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: node
id: eslint
conclusion: ${{ steps.eslint.outcome }}


- name: Report Build Starting
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: node
id: build
status: in_progress

- name: Build
id: build
continue-on-error: true
run: |
sleep 5
- name: Report Build Conclusion
if: always()
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: node
id: build
conclusion: ${{ steps.build.outcome }}


- name: Report Dusk Starting
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: php
id: dusk
status: in_progress

- name: Dusk
id: dusk
run: |
sleep 2 && false
- name: Report Dusk Conclusion
if: always()
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: php
id: dusk
conclusion: ${{ steps.dusk.outcome }}

- name: Report Psalm Starting
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: php
id: psalm
status: in_progress

- name: Psalm
id: psalm
run: |
sleep 15 && false
- name: Report Psalm Conclusion
if: always()
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
collection: php
id: psalm
conclusion: ${{ steps.psalm.outcome }}

- name: Clean up checks
if: always()
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
conclusion: cancelled
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "build-test"
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- master
- 'releases/*'

jobs:
env:
runs-on: ubuntu-latest
steps:
- run: |
echo "${{ toJson(runner) }}"
- run: |
env
- run: |
echo $GITHUB_EVENT_PATH
cat $GITHUB_EVENT_PATH
echo "done"
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: |
npm install
npm run all
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 05734ec

Please sign in to comment.