Skip to content

Fix Issues With Codegen ("server-only" error & event loop not clearing) #69

Fix Issues With Codegen ("server-only" error & event loop not clearing)

Fix Issues With Codegen ("server-only" error & event loop not clearing) #69

Workflow file for this run

name: Run Tests & Lint
on:
workflow_dispatch:
inputs:
expo-profile:
type: string
description: 'Expo profile to use for the End-to-End test build'
required: false
default: 'preview'
e2e-platform-json:
type: string
description: 'Platforms to run End-to-End tests on'
required: false
#default: '{"platform": ["ios","android"]}'
default: '{"platform": ["android"]}'
workflow_call:
inputs:
expo-profile:
type: string
description: 'Expo profile to use for the End-to-End test build'
required: true
default: 'preview'
e2e-platform-json:
type: string
description: 'Platforms to run End-to-End tests on'
required: true
#default: '{"platform": ["ios","android"]}'
default: '{"platform": ["android"]}'
push:
branches: '**'
tags: '!**'
paths-ignore:
- .gitignore
- LICENSE.md
- readme.md
- todo.md
- .vscode
env:
DEFAULT_E2E_PLATFORMS_JSON: '{"platform": ["ios", "android"]}' # GitHub didn't like having curly braces in the variable brace thingies, even inside a string
jobs:
test-code:
name: Code Tests & Lint
runs-on: ubuntu-latest
steps:
# ============================
# Project Setup
# ============================
- name: Clone Repo
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set Up PNPM
uses: pnpm/action-setup@v4
- name: Load Example ENV File
uses: duskmoon314/action-load-env@v1
id: load-env
with:
files: |
.env.example
- name: Set Up Node.js 21
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'pnpm'
# Tried caching Docker images, but doing so maed it slightly slower---not faster.
# And when the images update, it tacks another minute onto the end of the job.
- name: Install Dependencies & Run Codegen
run: pnpm install --frozen-lockfile
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# =============================
# Workflow-Specific Stuff
# =============================
- name: Run Code Tests
run: pnpm run test:code
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
run: pnpm run lint
build-expo:
name: Build / Mobile
needs: test-code
# TODO: Add End-To-End Tests
if: true == false
uses: ./.github/workflows/build-expo.yaml
with:
platformJson: ${{ inputs.e2e-platform-json || github.env.DEFAULT_E2E_PLATFORMS_JSON }}
profile: ${{ inputs.e2e-platform-json || 'preview' }}
fail-fast: true
secrets:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
build-next:
name: Build / Web
needs: test-code
# TODO: Add End-To-End Tests
if: true == false
uses: ./.github/workflows/build-next.yaml
test-end-to-end:
name: End-to-End Tests
needs: [build-expo, build-next]
# TODO: Add End-To-End Tests
if: true == false
runs-on: ubuntu-latest
steps:
# ============================
# Project Setup
# ============================
- name: Clone Repo
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set Up PNPM
uses: pnpm/action-setup@v4
with:
version: 9
- name: Set Up Node.js 21
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
shell: pwsh
# =============================
# Workflow-Specific Stuff
# =============================
- name: Download Native App Artifacts
uses: actions/download-artifact@v4
with:
pattern: expo-app-*
merge-multiple: true
path: ${{ github.workspace }}/dist
- name: Download Website Artifacts
uses: actions/download-artifact@v4
with:
pattern: site-docker-*
merge-multiple: true
path: ${{ github.workspace }}/dist
- name: Load Website Docker Images
run: docker load -i ${{ github.workspace }}/dist/site-docker-images.tar
shell: bash
- name: Run End-to-End Tests
run: pnpm test:e2e
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}