Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
add github action test (#18)
Browse files Browse the repository at this point in the history
* add github action test

* update pr.yml
  • Loading branch information
achorein committed Feb 5, 2024
1 parent eb2cc07 commit b65ed82
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
plugins
metro.config.js
babel.config.js
android
ios
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
root: true,
extends: ["universe/native"],
rules: {
"import/order": "off",
},
};
34 changes: 34 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: React Native CI for PR

on:
pull_request:
branches: main

jobs:
install-test-yarn:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: yarn install --immutable
- run: yarn lint
- run: yarn prebuild
install-test-npm:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"

- run: npm install
- run: npm run lint
- run: npm run prebuild
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"printWidth": 80,
"arrowParens": "always"
}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"ios": "expo run:ios",
"android": "expo run:android",
"test": "CI=1 expo install --check",
"lint": "eslint .",
"test:fix": "expo install --fix",
"doctor": "npx expo-doctor",
"postinstall": "patch-package"
Expand Down Expand Up @@ -36,7 +37,10 @@
"@expo/config-plugins": "~7.8.4"
},
"devDependencies": {
"@babel/core": "^7.18.6"
"@babel/core": "^7.18.6",
"eslint": "^8.50.0",
"eslint-config-universe": "^12.0.0",
"prettier": "^3.0.3"
},
"private": true
}

0 comments on commit b65ed82

Please sign in to comment.