Skip to content
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
105 changes: 105 additions & 0 deletions .github/workflows/expo-latest-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Expo Latest

on:
push:
branches: [ feat/v3 ]
pull_request:
branches: [ feat/v3 ]
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC

jobs:
check-expo-version:
runs-on: macos-latest
outputs:
should_run: ${{ steps.check.outputs.should_run }}
latest_version: ${{ steps.check.outputs.latest_version }}
steps:
- id: check
run: |
LATEST=$(npm view expo version)
CURRENT=$(cat .expo-version 2>/dev/null || echo "")
if [ "$LATEST" != "$CURRENT" ]; then
echo "should_run=true" >> $GITHUB_OUTPUT
echo "latest_version=$LATEST" >> $GITHUB_OUTPUT
echo $LATEST > .expo-version
else
echo "should_run=false" >> $GITHUB_OUTPUT
fi
test-expo-latest:
needs: check-expo-version
if: ${{ needs.check-expo-version.outputs.should_run == 'true' || github.event_name == 'push' || github.event_name == 'pull_request' }}
runs-on: macos-latest
name: Expo latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Create Expo project
run: |
npx create-expo-app@latest test-app
cd test-app
- name: Install dependencies
working-directory: test-app
run: |
npm install react-native-web react-dom @expo/metro-runtime
- name: Install gluestack-ui
working-directory: test-app
run: |
npx gluestack-ui-nightly init --template-only --projectType expo
npx gluestack-ui-nightly add --all
npx tailwindcss -i ./global.css -o ./node_modules/.cache/nativewind/global.css
- name: Add Button component
working-directory: test-app
run: |
mkdir -p app/\(tabs\)
cat <<EOT > app/\(tabs\)/index.tsx
import React from 'react';
import { View } from 'react-native';
import { Button, ButtonText } from '@/components/ui/button';
export default function App() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Button size="md" variant="solid" action="primary">
<ButtonText>Hello World!</ButtonText>
</Button>
</View>
);
}
EOT
- name: Start Expo web app
working-directory: test-app
run: |
npm run web & sleep 30
- name: Check if button is rendered
run: |
echo "First curl attempt:"
curl -s http://localhost:8081 | tee curl_output_1.log
echo "Waiting for 30 seconds..."
sleep 30
echo "Second curl attempt:"
curl -s http://localhost:8081 | tee curl_output_2.log
echo "Searching for 'Hello World!' in the output:"
if grep -q "Hello World!" curl_output_1.log || grep -q "Hello World!" curl_output_2.log; then
echo "Button found on the page"
exit 0
else
echo "Button not found on the page"
exit 1
fi
notify:
needs: test-expo-latest
if: always() && github.event_name == 'push' && github.ref == 'refs/heads/feat/v3'
runs-on: macos-latest
steps:
- name: Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: 'Expo Latest Test: ${{ job.status }}'
fields: repo,commit,action,eventName
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
98 changes: 98 additions & 0 deletions .github/workflows/next-latest-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Next.js Latest

on:
push:
branches: [feat/v3]
pull_request:
branches: [feat/v3]
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC

jobs:
check-next-version:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.check.outputs.should_run }}
latest_version: ${{ steps.check.outputs.latest_version }}
steps:
- id: check
run: |
LATEST=$(npm view next version)
CURRENT=$(cat .next-version 2>/dev/null || echo "")
echo "Latest version: $LATEST"
echo "Current version: $CURRENT"
if [ "$LATEST" != "$CURRENT" ]; then
echo "should_run=true" >> $GITHUB_OUTPUT
echo "latest_version=$LATEST" >> $GITHUB_OUTPUT
echo $LATEST > .next-version
else
echo "should_run=false" >> $GITHUB_OUTPUT
fi

test-next-latest:
needs: check-next-version
if: ${{ needs.check-next-version.outputs.should_run == 'true' || github.event_name == 'push' || github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
name: Next.js latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Print Environment Info
run: |
node -v
npm -v
cat .next-version || echo ".next-version file not found"

- name: Set Git identity
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Create Next.js project from create-command
run: |
npx create-gluestack-nightly@latest test-app --next-app-router
cd test-app

- name: Build Next.js app
working-directory: test-app
env:
NEXT_TELEMETRY_DISABLED: 1
run: |
npm run build

- name: Start Next.js app
working-directory: test-app
run: |
npm run start &
sleep 20

- name: Fetch and Log Server Response
run: |
curl -s http://localhost:3000 || echo "Failed to reach the server"
curl -s http://localhost:3000 > server_response.html
cat server_response.html

- name: Check if text is rendered
run: |
RESPONSE=$(curl -s http://localhost:3000)
echo "$RESPONSE" | grep -q "Get started by editing" && echo "text found" || (echo "text not found" && exit 1)

notify:
needs: test-next-latest
if: always() && github.event_name == 'push' && github.ref == 'refs/heads/feat/v3'
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: 'Next.js Latest Test: ${{ job.status }}'
fields: repo,commit,action,eventName
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
164 changes: 164 additions & 0 deletions .github/workflows/vercel-deployments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: Vercel Deployments

on:
push:
branches: [feat/v3]
pull_request:
branches: [feat/v3]

jobs:
deploy-kitchen-sink:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install Vercel CLI
run: npm install -g vercel@latest

- name: Install dependencies
run: npm install

- name: Deploy to Vercel (Production)
if: github.event_name == 'push' && github.ref == 'refs/heads/feat/v3'
working-directory: ./apps/kitchen-sink
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
run: |
vercel --prod --yes --token $VERCEL_TOKEN --scope $VERCEL_ORG_ID \
--build-env NODE_OPTIONS="--max-old-space-size=4096" \
--name kitchen-sink

- name: Deploy to Vercel (Preview)
if: github.event_name == 'pull_request'
working-directory: ./apps/kitchen-sink
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
run: |
vercel --yes --token $VERCEL_TOKEN --scope $VERCEL_ORG_ID \
--build-env NODE_OPTIONS="--max-old-space-size=4096" \
--name kitchen-sink

deploy-todo-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install Vercel CLI
run: npm install -g vercel@latest

- name: Install dependencies
run: npm install

- name: Deploy to Vercel (Production)
if: github.event_name == 'push' && github.ref == 'refs/heads/feat/v3'
working-directory: ./apps/todo-app
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
run: |
vercel --prod --yes --token $VERCEL_TOKEN --scope $VERCEL_ORG_ID \
--build-env NODE_OPTIONS="--max-old-space-size=4096" \
--name todo-app

- name: Deploy to Vercel (Preview)
if: github.event_name == 'pull_request'
working-directory: ./apps/todo-app
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
run: |
vercel --yes --token $VERCEL_TOKEN --scope $VERCEL_ORG_ID \
--build-env NODE_OPTIONS="--max-old-space-size=4096" \
--name todo-app

deploy-starter-kit-expo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install Vercel CLI
run: npm install -g vercel@latest

- name: Install dependencies
run: npm install

- name: Deploy to Vercel (Production)
if: github.event_name == 'push' && github.ref == 'refs/heads/feat/v3'
working-directory: ./apps/starter-kit-expo
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
run: |
vercel --prod --yes --token $VERCEL_TOKEN --scope $VERCEL_ORG_ID \
--build-env NODE_OPTIONS="--max-old-space-size=4096" \
--name starter-kit-expo

- name: Deploy to Vercel (Preview)
if: github.event_name == 'pull_request'
working-directory: ./apps/starter-kit-expo
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
run: |
vercel --yes --token $VERCEL_TOKEN --scope $VERCEL_ORG_ID \
--build-env NODE_OPTIONS="--max-old-space-size=4096" \
--name starter-kit-expo

deploy-starter-kit-next:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install Vercel CLI
run: npm install -g vercel@latest

- name: Install dependencies
run: npm install

- name: Deploy to Vercel (Production)
if: github.event_name == 'push' && github.ref == 'refs/heads/feat/v3'
working-directory: ./apps/starter-kit-next
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
run: |
vercel --prod --yes --token $VERCEL_TOKEN --scope $VERCEL_ORG_ID \
--build-env NODE_OPTIONS="--max-old-space-size=4096" \
--name starter-kit-next

- name: Deploy to Vercel (Preview)
if: github.event_name == 'pull_request'
working-directory: ./apps/starter-kit-next
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
run: |
vercel --yes --token $VERCEL_TOKEN --scope $VERCEL_ORG_ID \
--build-env NODE_OPTIONS="--max-old-space-size=4096" \
--name starter-kit-next