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

ci: add initial test pipeline #20

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
70 changes: 70 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Test

on:
pull_request:
branches:
- main
schedule:
- cron: '0 13 * * 6' # At 13:00 on Saturday

permissions: {}

jobs:
test:
name: Android
runs-on: ubuntu-latest
permissions: {}

steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
dl.google.com:443
github.com:443
objects.githubusercontent.com:443
oss.sonatype.org:443
plugins-artifacts.gradle.org:443
plugins.gradle.org:443
registry.npmjs.org:443
repo.clojars.org:443
repo.maven.apache.org:443
repo1.maven.org:443
services.gradle.org:443

- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Setup Java
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: temurin
java-version: 17

- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
cache: npm

- name: Setup Android SDK
uses: android-actions/setup-android@00854ea68c109d98c75d956347303bf7c45b0277 # v3.2.1

- name: Bootstrap Dependencies
run: npm ci

- name: Build Android APK
run: |
cd packages/frontend
npm exec \
--package=shadow-cljs \
-- \
shadow-cljs compile app
npm exec \
--package=expo \
-- \
expo prebuild --platform=android
cd android
./gradlew assembleRelease
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ node_modules/
.lsp/
.expo/
*~
packages/frontend/app/
packages/frontend/assets/*
\#*#
.\#*
.m2
Expand Down
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

A proof of concept application created by the SBE Innovation Team, part of the SBE NSF Council.

## Prerequisites

- Node.js 20
- Java 17
- Android CLI Tools
- ADB with a connected Android device/emulator

## Getting Started

To quickly deploy the mobile app to an Android device with Expo:

```sh
$ git clone https://github.com/safsbe/mental-health-app
$ cd mental-health-app
$ npm ci
$ npm run -w '@safsbe/mental-health-frontend' watch:common
$ npm run -w '@safsbe/mental-health-frontend' watch:android:expo

# Press 's' to switch to Expo Go builds
```

## Security

See [SECURITY.md](./SECURITY.md).
Expand All @@ -17,4 +38,3 @@ External pull requests are not currently being accepted. Our internal contributi
## Developing

Instructions for building and developing this appication is provided in [DEVELOPING.md](./DEVELOPING.md).

16 changes: 0 additions & 16 deletions app.json

This file was deleted.

Loading
Loading