Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ on:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
ref: ${{ github.ref }}

- name: Setup node
uses: actions/setup-node@v2
Expand All @@ -36,9 +37,11 @@ jobs:
CI: true

- name: Format files
if: ${{ github.event_name == 'push' }}
run: npm run format

- name: Commit formatting changes
if: ${{ github.event_name == 'push' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply formatting changes
Expand All @@ -48,23 +51,25 @@ jobs:
run: npm run lint

- name: Linting failed (attempting fix...)
if: ${{ failure() }}
if: ${{ failure() && github.event_name == 'push' }}
run: npm run lint:fix

- name: Commit fixed lint issues
if: ${{ github.event_name == 'push' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply fixed lint issues
branch: ${{ github.head_ref }}

test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
ref: ${{ github.ref }}

- name: Setup node
uses: actions/setup-node@v2
Expand Down
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
transform: {
"^.+\\.tsx?$": "ts-jest"
},
moduleFileExtensions: ["ts", "tsx", "js", "jsx"]
};
Loading