-
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.
ci: automatic lint, test, typecheck, and format action (#18)
* ci: add checking scripts * ci: add code checking action * fix: correctly type the useTheme hook * test: add dummy test to make jest happy * test: remove obsolete test snapshot
- Loading branch information
1 parent
81d0860
commit f718202
Showing
8 changed files
with
59 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Typecheck, lint, format and test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint-typecheck: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Typecheck | ||
run: npm run check:types | ||
|
||
- name: Lint | ||
run: npm run check:lint | ||
|
||
- name: Format | ||
run: npm run check:format | ||
|
||
- name: Test | ||
run: npm run check:test |
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 |
---|---|---|
|
@@ -11,6 +11,9 @@ npm-debug.* | |
web-build/ | ||
.env | ||
|
||
# Test stuff | ||
coverage/ | ||
|
||
# macOS | ||
.DS_Store | ||
|
||
|
24 changes: 0 additions & 24 deletions
24
components/__tests__/__snapshots__/ThemedText-test.tsx.snap
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Jest requires at least one test file in the project to run the tests. | ||
// This is a dummy test file to make Jest happy. | ||
|
||
describe('It should pass', () => { | ||
it('should pass', () => { | ||
expect(1).toBe(1); | ||
}); | ||
}); |
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,4 +1,5 @@ | ||
import Colors from './colors'; | ||
import Themes from './themes'; | ||
import { DarkTheme } from './themes'; | ||
|
||
export { Colors, Themes }; | ||
export { Colors, Themes, DarkTheme }; |
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 |
---|---|---|
|
@@ -29,4 +29,6 @@ const Themes = { | |
}, | ||
}; | ||
|
||
export type DarkTheme = (typeof Themes)['dark']['default']; | ||
|
||
export default Themes; |