-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'andrew_testing' into eliyas/type_fix
- Loading branch information
Showing
33 changed files
with
436 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: 'Setup JS Runtime Environment' | ||
description: 'Sets up Node.js and caches Node modules' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
cache: 'yarn' | ||
|
||
- name: Cache Yarn packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.yarn/cache | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
run: yarn install --immutable | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,61 @@ | ||
# Add 'root' label to any root file changes | ||
# Quotation marks are required for the leading asterisk | ||
root: | ||
- changed-files: | ||
- any-glob-to-any-file: '*' | ||
- changed-files: | ||
- any-glob-to-any-file: '*' | ||
|
||
## Equivalent of the above mentioned configuration using another syntax | ||
docs: | ||
- changed-files: | ||
- any-glob-to-any-file: ['docs/*', 'guides/*', '**/*.md'] | ||
- changed-files: | ||
- any-glob-to-any-file: '{docs/**/*,guides/**/*,**/*.md}' | ||
|
||
# Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name | ||
feature: | ||
- head-branch: ['^feature', 'feature'] | ||
- head-branch: ['^feature', 'feature'] | ||
|
||
# Add 'release' label to any PR that is opened against the `main` branch | ||
release: | ||
- base-branch: 'main' | ||
- base-branch: 'main' | ||
|
||
# Add 'test' label to any change to *.spec.ts, *.spec.js, *.test.ts, *.test.js files within the entire repository | ||
test: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- '**/*.spec.ts' | ||
- '**/*.spec.js' | ||
- '**/*.test.ts' | ||
- '**/*.test.js' | ||
- '**/tests/**/*.ts' | ||
- '**/tests/**/*.js' | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- '**/*.spec.ts' | ||
- '**/*.spec.js' | ||
- '**/*.test.ts' | ||
- '**/*.test.js' | ||
- '**/tests/**/*.ts' | ||
- '**/tests/**/*.js' | ||
|
||
# Add 'frontend' label to any change in the 'client' directory | ||
frontend: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'apps/**/*.{ts,js}' | ||
- any: 'apps/**/*.ts' | ||
- any: 'apps/**/*.js' | ||
- all-globs-to-all-files: | ||
- '!apps/src/main.ts' | ||
- '!apps/src/main.js' | ||
- changed-files: | ||
- any-glob-to-any-file: 'apps/**/*.{ts,js, jsx, tsx}' | ||
|
||
# Add 'backend' label to any change in the 'server' directory | ||
backend: | ||
- changed-files: | ||
- any-glob-to-any-file: 'server/**/*.{ts,js}' | ||
- changed-files: | ||
- any-glob-to-any-file: 'server/**/*.{ts,js}' | ||
|
||
# Add the 'AnyChange' label to any changes within the entire repository | ||
AnyChange: | ||
- changed-files: | ||
- any-glob-to-any-file: '**' | ||
- changed-files: | ||
- any-glob-to-any-file: '*' | ||
|
||
# Add 'client' label to any change in the 'apps' directory | ||
client: | ||
- changed-files: | ||
- any-glob-to-any-file: 'apps/**/*' | ||
- changed-files: | ||
- any-glob-to-any-file: 'apps/**/*' | ||
|
||
# Add 'expo' label to any changes in the 'apps/expo' directory | ||
expo: | ||
- changed-files: | ||
- any-glob-to-any-file: 'apps/expo/**/*' | ||
- changed-files: | ||
- any-glob-to-any-file: 'apps/expo/**/*' | ||
|
||
# Add 'next' label to any changes in the 'apps/next' directory | ||
next: | ||
- changed-files: | ||
- any-glob-to-any-file: 'apps/next/**/*' | ||
- changed-files: | ||
- any-glob-to-any-file: 'apps/next/**/*' | ||
|
||
# Add 'vite' label to any changes in the 'apps/vite' directory | ||
vite: | ||
- changed-files: | ||
- any-glob-to-any-file: 'apps/vite/**/*' | ||
- changed-files: | ||
- any-glob-to-any-file: 'apps/vite/**/*' | ||
|
||
# Add 'api' label to any changes in the 'api' or 'server' directories | ||
api: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'api/**/*' | ||
- 'server/**/*' | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'api/**/*' | ||
- 'server/**/*' | ||
|
||
github: | ||
- changed-files: | ||
- any-glob-to-any-file: '.github/**/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,51 @@ | ||
name: android-build-apk | ||
on: | ||
push: | ||
branches: [ "**" ] | ||
branches: ['**'] | ||
pull_request: | ||
branches: [ "**" ] | ||
branches: ['**'] | ||
|
||
jobs: | ||
install-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install yarn dependencies | ||
run: | | ||
yarn install | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-deps | ||
build-android: | ||
needs: install-and-test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install yarn dependencies | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
cache: yarn | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-deps | ||
|
||
- name: Prebuild | ||
run: | | ||
yarn install | ||
echo "Using Mapbox Token: $MAPBOX_DOWNLOADS_TOKEN" | ||
export MAPBOX_DOWNLOADS_TOKEN=${{ secrets.MAPBOX_DOWNLOADS_TOKEN }} | ||
yarn run prebuild:expo | ||
- name: Build Android Release | ||
run: | | ||
cd apps/expo/android && ./gradlew assembleRelease | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: app-release.apk | ||
path: android/app/build/outputs/apk/release/ | ||
path: android/app/build/outputs/apk/release/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: 'Backend Deployment' | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'packages/api/**' | ||
- 'server/**' | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to Cloudflare Workers | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup JS Runtime environment | ||
uses: ./.github/actions/setup-js-runtime | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-deps | ||
|
||
- name: Migrate database | ||
# run: cd packages/api && bun run migrate | ||
run: cd server && yarn run migrate:prod | ||
env: | ||
NO_D1_WARNING: true | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | ||
|
||
- name: Deploy | ||
uses: cloudflare/[email protected] | ||
with: | ||
wranglerVersion: '3.15.0' | ||
apiToken: ${{ secrets.CF_API_TOKEN }} | ||
# workingDirectory: packages/api | ||
workingDirectory: server | ||
command: yarn run deploy:prod | ||
packageManager: bun | ||
secrets: | | ||
APP_URL | ||
JWT_VERIFICATION_KEY | ||
CI | ||
env: | ||
APP_URL: ${{ secrets.NEXT_PUBLIC_APP_URL }} | ||
JWT_VERIFICATION_KEY: ${{ secrets.JWT_VERIFICATION_KEY }} | ||
CI: true | ||
NO_D1_WARNING: true |
Oops, something went wrong.