-
Notifications
You must be signed in to change notification settings - Fork 574
69 lines (62 loc) · 2.09 KB
/
deployment-e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: test
on:
pull_request:
paths-ignore:
- 'website/**'
jobs:
e2e:
strategy:
fail-fast: false
matrix:
plan:
[
'cf-worker',
'cf-modules',
'azure-function',
'aws-lambda',
'vercel-function',
]
name: e2e / ${{ matrix.plan }}
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 18
packageManager: pnpm
- name: Build Packages
run: pnpm build
- name: Install pulumi
uses: pulumi/setup-pulumi@v2
- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "::set-output name=docker_host::$(docker context inspect --format '{{.Endpoints.docker.Host}}')"
- name: Provision & Test
run: pnpm start
working-directory: e2e
env:
# General
TEST_PLAN_NAME: ${{ matrix.plan }}
COMMIT_ID: ${{ steps.vars.outputs.sha_short }}
# CloudFlare
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
# Azure
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
# AWS
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
AWS_REGION: ${{ secrets.AWS_REGION }}
# Vercel
VERCEL_AUTH_TOKEN: ${{ secrets.VERCEL_AUTH_TOKEN }}