Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: improve CI workflow and package configuration #723

Merged
merged 3 commits into from
Nov 24, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
refactor: Improve CI workflow and package configuration
dohooo committed Nov 24, 2024
commit 646abd332c88bbaf6cbc7c8ffd6e7870a89525b4
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ permissions:

jobs:
setup:
name: Setup & Lint
name: Setup & Code Quality
runs-on: ubuntu-latest
timeout-minutes: 10

@@ -55,7 +55,10 @@ jobs:
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: Lint code
- name: Check code format
run: yarn format

- name: Run linter
run: yarn lint

- name: Type check
@@ -85,11 +88,14 @@ jobs:
~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Clean lib directory
run: yarn clean

- name: Build project
run: yarn build
run: yarn prepare

- name: Run tests
run: yarn test --coverage
run: yarn test

- name: Upload coverage reports
uses: codecov/codecov-action@v3
29 changes: 25 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -13,13 +13,20 @@
"bugs": {
"url": "https://github.com/dohooo/react-native-reanimated-carousel/issues"
},
"keywords": ["react-native", "ios", "android"],
"keywords": [
"react-native",
"ios",
"android"
],
"main": "lib/commonjs/index",
"module": "lib/module/index",
"react-native": "src/index.tsx",
"types": "lib/typescript/index.d.ts",
"source": "src/index",
"files": ["lib", "src"],
"files": [
"lib",
"src"
],
"scripts": {
"gif": "node scripts/makegif.js ./scripts/gif-works-directory",
"test": "jest run src/**/*",
@@ -84,12 +91,26 @@
}
},
"commitlint": {
"extends": ["@commitlint/config-conventional"]
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"subject-case": [
0
],
"type-case": [
0
]
}
},
"react-native-builder-bob": {
"source": "src",
"output": "lib",
"targets": ["commonjs", "module", "typescript"]
"targets": [
"commonjs",
"module",
"typescript"
]
},
"config": {
"commitizen": {