cloudflare/cloudflare-typescript

Public

mirrored from https://github.com/cloudflare/cloudflare-typescriptAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
vaishak/changelog

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

116lines · modecode

1name: CI
2on:
3 push:
4 branches-ignore:
5 - 'generated'
6 - 'codegen/**'
7 - 'integrated/**'
8 - 'stl-preview-head/**'
9 - 'stl-preview-base/**'
10 pull_request:
11 branches-ignore:
12 - 'stl-preview-head/**'
13 - 'stl-preview-base/**'
14
15concurrency:
16 group: ${{ github.workflow }}-${{ github.ref }}
17 cancel-in-progress: true
18
19jobs:
20 lint:
21 timeout-minutes: 10
22 name: lint
23 runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
24 if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
25 steps:
26 - uses: actions/checkout@v4
27
28 - name: Set up Node
29 uses: actions/setup-node@v4
30 with:
31 node-version: '18'
32
33 - name: Bootstrap
34 run: ./scripts/bootstrap
35
36 - name: Check types
37 run: ./scripts/lint
38
39 build:
40 timeout-minutes: 5
41 name: build
42 runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
43 if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
44 permissions:
45 contents: read
46 id-token: write
47 steps:
48 - uses: actions/checkout@v4
49
50 - name: Set up Node
51 uses: actions/setup-node@v4
52 with:
53 node-version: '18'
54
55 - name: Bootstrap
56 run: ./scripts/bootstrap
57
58 - name: Check build
59 run: ./scripts/build
60
61 - name: Get GitHub OIDC Token
62 if: github.repository == 'stainless-sdks/cloudflare-node'
63 id: github-oidc
64 uses: actions/github-script@v6
65 with:
66 script: core.setOutput('github_token', await core.getIDToken());
67
68 - name: Upload tarball
69 if: github.repository == 'stainless-sdks/cloudflare-node'
70 env:
71 URL: https://pkg.stainless.com/s
72 AUTH: ${{ steps.github-oidc.outputs.github_token }}
73 SHA: ${{ github.sha }}
74 run: ./scripts/utils/upload-artifact.sh
75 test:
76 timeout-minutes: 10
77 name: test
78 runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
79 if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
80 steps:
81 - uses: actions/checkout@v4
82
83 - name: Set up Node
84 uses: actions/setup-node@v4
85 with:
86 node-version: '20'
87
88 - name: Bootstrap
89 run: ./scripts/bootstrap
90
91 - name: Run tests
92 run: ./scripts/test
93 examples:
94 timeout-minutes: 10
95 name: examples
96 runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
97 if: github.repository == 'cloudflare/cloudflare-typescript' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
98
99 steps:
100 - uses: actions/checkout@v4
101
102 - name: Set up Node
103 uses: actions/setup-node@v4
104 with:
105 node-version: '20'
106 - name: Install dependencies
107 run: |
108 yarn install
109
110 - env:
111 CLOUDFLARE_ACCOUNT_ID: f037e56e89293a057740de681ac9abbe
112 CLOUDFLARE_EMAIL: terraform-acceptance-test@cfapi.net
113 CLOUDFLARE_ZONE_ID: 0da42c8d2132a9ddaf714f9e7c92011
114 CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}
115 run: |
116 yarn tsn ./examples/ai/demo.ts
117