Skip to content

Commit

Permalink
chore(github-actions): create update.yml and add code coverage config…
Browse files Browse the repository at this point in the history
…uration
  • Loading branch information
23nosurrend committed May 6, 2024
1 parent 2962aec commit 04653d8
Show file tree
Hide file tree
Showing 25 changed files with 8,144 additions and 4,185 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Running Code Coverage

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x,19.x,20.x,21.x,22.x]

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- name: Run tests
run: npm run test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: update
on:
pull_request:
branches:
- develop

jobs:
update:
name: EAS Update
runs-on: windows-latest
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "EXPO_TOKEN is not set."
exit 1
fi
shell: bash

- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '>=18.x'
cache: npm

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: npm install

- name: Deploy to Expo
run: npm run build
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# dependencies
node_modules/

# Expo
.expo/
dist/
Expand Down Expand Up @@ -38,4 +37,6 @@ yarn-error.*
# The following patterns were generated by expo-cli

expo-env.d.ts
# @end expo-cli
# @end expo-cli
coverage/
node_modules
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,8 @@ Contributions are welcome! To contribute to this repository, please follow these
## License

None At the moment !!
# Test coverage

[![codecov](https://codecov.io/gh/atlp-rwanda/matadors-rn-medica/graph/badge.svg?token=5OP0X0107C)](https://codecov.io/gh/atlp-rwanda/matadors-rn-medica)

For coverage on other branches, please visit the [Codecov project page](https://codecov.io/gh/atlp-rwanda/matadors-rn-medica) and select the appropriate branch.
56 changes: 56 additions & 0 deletions SpashScreen/Splash.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import Loading from "@/app/spinner/Loading";
import { Image, StyleSheet, Text, View } from "react-native";



export default function SplashScreen(){
return (
<>
<View style={styles.container}>
<View style={styles.splash}>
<View>
<View>
<Image source={require('../assets/images/icon.png')}/>
</View>
</View>

<View>
<Text style={styles.text}>Medica</Text>
</View>
<View style={styles.spin}>
<Loading/>
</View>


</View>

</View>
</>
)
}

const styles = StyleSheet.create({
container:{
flex:1,
justifyContent:'center',
alignItems:'center',
backgroundColor:'#ffff'
},
splash:{
flex:1,
flexDirection:'row',
justifyContent:'center',
alignItems:'center',
backgroundColor:'white',
gap:20,
width:'100%'
},
text:{
fontSize:30
},
spin:{
position:'absolute',
bottom: 50

}
})
29 changes: 25 additions & 4 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,48 @@
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": ["**/*"],
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"config": {
"usesNonExemptEncryption": false
}
},
"bundleIdentifier": "medical.app"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"package": "medical.app"
},
"web": {
"bundler": "metro",
"output": "static",
"favicon": "./assets/images/favicon.png"
},
"plugins": ["expo-router", "expo-secure-store"],
"plugins": [
"expo-router",
"expo-secure-store"
],
"experiments": {
"typedRoutes": true
},
"extra": {
"router": {
"origin": false
},
"eas": {
"projectId": "0e90de2a-1056-4ff2-a7c3-3d58fd05665c"
}
},
"runtimeVersion": {
"policy": "appVersion"
},
"updates": {
"url": "https://u.expo.dev/0e90de2a-1056-4ff2-a7c3-3d58fd05665c"
}
}
}
64 changes: 61 additions & 3 deletions app/(app)/HomeScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
interface Props {}
import { Image, ScrollView, StyleSheet, Text, View } from "react-native";
import Typography from "@/constants/Typography";
import Colors from "@/constants/Colors";

export default function HomeScreen({}: Props) {
return <></>;


export default function HomeScreen(){
return (
<>
<View style={styles.container}>

<View style={styles.image}>
<Image source={require('../../assets/images/Group.png')} style={styles.imagex}/>
</View>

<View>
<Text style={styles.text}>Welcome to Medica! 👋</Text>
<Text style={styles.description}>The best online doctor appointment & consultation app of the century for your health and medical needs!</Text>
</View>


</View>

</>
)
}

const styles = StyleSheet.create({
container:{
flex:1,
justifyContent:'center',
alignItems:'center',
backgroundColor:'#ffff',
paddingTop:50,
paddingBottom:70
},

text:{
fontSize:40,
textAlign:'center',
paddingLeft:30,
paddingRight:30,
color:'#236bfd',
fontFamily:'Bold',
},
description:{
textAlign:'center',
lineHeight:25,
paddingBottom:30,
paddingTop:20,
fontFamily:'Regular',
color:Colors.light.text,
fontSize:17
},
image:{
// width: '100%',
objectFit:'cover',
height:'70%'
},
imagex:{
height:'100%'
}
})
Loading

0 comments on commit 04653d8

Please sign in to comment.