test-hosts.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. name: Hosted tests
  2. on:
  3. schedule:
  4. - cron: '0 0 * * 0'
  5. env:
  6. ASTRO_TELEMETRY_DISABLED: true
  7. TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
  8. TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
  9. VERCEL_ORG_ID: ${{ secrets.VERCEL_TEST_ORG_ID }}
  10. VERCEL_PROJECT_ID: ${{ secrets.VERCEL_TEST_PROJECT_ID }}
  11. VERCEL_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }}
  12. FORCE_COLOR: true
  13. jobs:
  14. test:
  15. name: Run tests
  16. runs-on: ubuntu-latest
  17. steps:
  18. - name: Check out repository
  19. uses: actions/checkout@v4
  20. - name: Setup PNPM
  21. uses: pnpm/action-setup@v2
  22. - name: Setup Node
  23. uses: actions/setup-node@v4
  24. with:
  25. node-version: 18
  26. cache: 'pnpm'
  27. - name: Install dependencies
  28. run: pnpm install
  29. - name: Build Astro
  30. run: pnpm turbo build --filter astro --filter @astrojs/vercel
  31. - name: Build test project
  32. working-directory: ./packages/integrations/vercel/test/hosted/hosted-astro-project
  33. run: pnpm run build
  34. - name: Deploy to Vercel
  35. working-directory: ./packages/integrations/vercel/test/hosted/hosted-astro-project
  36. run: pnpm dlx vercel --prod --prebuilt
  37. - name: Test
  38. run: pnpm run test:e2e:hosts