Skip to content

Commit

Permalink
Merge branch 'main' into update-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aaditkamat authored Feb 25, 2024
2 parents 57ddcf1 + 4ac5a90 commit f6e62b1
Show file tree
Hide file tree
Showing 53 changed files with 3,949 additions and 1,828 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Unit Tests

on: [pull_request]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [21.x]

steps:
- name: Checkout repository
uses: actions/checkout@v2

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

- name: Install dependencies
run: npm ci
working-directory: server/

- name: Set up environment variables
run: |
mkdir private_key
echo "${{ secrets.SERVICE_ACCOUNT_SECRET }}" > private_key/private.json
working-directory: server/src

- name: Compile TypeScript files
run: npx tsc
working-directory: server/

- name: Start index.ts in background
run: npm start &
working-directory: server/

- name: Wait for server to start
run: sleep 5 # Adjust sleep time as needed to allow the server to start
timeout-minutes: 1

- name: Run tests
run: npm test
working-directory: server/
95 changes: 0 additions & 95 deletions ApiChecklist.md

This file was deleted.

3 changes: 0 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@
3. Make your changes.
5. Push your changes to your fork.
6. Submit a pull request through GitHub.

# What do I work on?
See [DesignChecklist.md](https://github.com/ufosc/OSC-Proximity-Chat-App/blob/main/DesignChecklist.md) if you'd like to work on the frontend, or [ApiChecklist.md](https://github.com/ufosc/OSC-Proximity-Chat-App/blob/main/ApiChecklist.md) if you'd like to work on the backend.
61 changes: 0 additions & 61 deletions DesignChecklist.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Announcement: messages can now be sent and recieved between phones!
# Echologator
We're making an app that allows you to text with people within a set radius around you, anonymously. You could use this to easily chat with people at very populated places, like a library or dining hall on campus.

Expand Down
8 changes: 7 additions & 1 deletion client/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@
"favicon": "./assets/favicon.png"
},
"plugins": [
"expo-router"
"expo-router",
[
"expo-location",
{
"locationAlwaysAndWhenInUsePermission": "Allow OSC Proximity Chat to access your location."
}
]
]
}
}
Binary file added client/assets/temp_front_page_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 13 additions & 8 deletions client/config_example.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# dotenv config file (copy this config to a new file named `.env`)

# **Do not delete this file**

# Shake your phone to open the developer menu. The IP address will be displayed on the connection.
EXPO_PUBLIC_BACKEND_ADDRESS = ### EXPO CONNECTION IP ADDRESS ###
EXPO_PUBLIC_BACKEND_PORT=3001

EXPO_IP= place_your_expo_ip_here

# For location refresh rate in milliseconds (keep it 3000 for now)

LOCATION_REFRESH_RATE=3000

# Firebase config
apiKey = place_your_apiKey_here
authDomain = place_your_authDomain_here
projectId = place_your_projectId_here
storageBucket = place_your_storageBucket_here
messagingSenderId = place_your_messagingSenderId_here
appId = place_your_appId_here

API_KEY = place_your_apiKey_here
AUTH_DOMAIN = place_your_authDomain_here
PROJECT_ID = place_your_projectId_here
STORAGE_BUCKET = place_your_storageBucket_here
MESSAGING_SENDER_ID = place_your_messagingSenderId_here
APP_ID = place_your_appId_here
39 changes: 24 additions & 15 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"react-native-screens": "~3.22.0",
"react-native-uuid": "^2.0.1",
"react-native-web": "~0.19.6",
"socket.io-client": "^4.7.4"
"socket.io-client": "^4.7.4",
"expo-network": "~5.4.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand Down
27 changes: 18 additions & 9 deletions client/src/app/(home)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
import React from "react";
import { Stack } from "expo-router";
import { SettingsProvider } from "../../contexts/SettingsContext";
import { SocketProvider } from "../../contexts/SocketContext";
import { LocationProvider } from "../../contexts/LocationContext";
import { UserProvider } from "../../contexts/UserContext";

const AuthLayout = () => {
return (
<SettingsProvider>
<Stack
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen name="chatchannel" options={{}} />
</Stack>
</SettingsProvider>
<LocationProvider>
<SocketProvider>
<UserProvider>
<SettingsProvider>
<Stack
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen name="chatchannel" options={{}} />
</Stack>
</SettingsProvider>
</UserProvider>
</SocketProvider>
</LocationProvider>
);
};

Expand Down
Loading

0 comments on commit f6e62b1

Please sign in to comment.