2023-07-21 14:24:36 -05:00
|
|
|
name: Hosted tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * 0'
|
|
|
|
|
|
|
|
env:
|
|
|
|
ASTRO_TELEMETRY_DISABLED: true
|
|
|
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
|
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
|
|
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_TEST_ORG_ID }}
|
|
|
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_TEST_PROJECT_ID }}
|
|
|
|
VERCEL_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }}
|
|
|
|
FORCE_COLOR: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Run tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup PNPM
|
|
|
|
uses: pnpm/action-setup@v2
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 18
|
|
|
|
cache: "pnpm"
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install
|
2023-10-10 09:06:35 -05:00
|
|
|
|
|
|
|
- name: Build Astro
|
|
|
|
run: pnpm turbo build --filter astro --filter @astrojs/vercel
|
2023-07-21 14:24:36 -05:00
|
|
|
|
2023-10-10 09:06:35 -05:00
|
|
|
- name: Build test project
|
2023-07-21 14:24:36 -05:00
|
|
|
working-directory: ./packages/integrations/vercel/test/hosted/hosted-astro-project
|
|
|
|
run:
|
|
|
|
pnpm run build
|
2023-10-10 09:06:35 -05:00
|
|
|
|
|
|
|
- name: Deploy to Vercel
|
|
|
|
working-directory: ./packages/integrations/vercel/test/hosted/hosted-astro-project
|
2023-07-21 14:24:36 -05:00
|
|
|
run:
|
2023-10-10 09:06:35 -05:00
|
|
|
pnpm dlx vercel --prod --prebuilt
|
2023-07-21 14:24:36 -05:00
|
|
|
|
2023-10-10 09:06:35 -05:00
|
|
|
- name: Test
|
2023-07-21 14:24:36 -05:00
|
|
|
run:
|
|
|
|
pnpm run test:e2e:hosts
|