cloudflare/cloudflare-typescript
Publicmirrored fromhttps://github.com/cloudflare/cloudflare-typescriptAvailable
.github/workflows/ci.yml
68lines · modecode
| 1 | name: CI |
| 2 | on: |
| 3 | push: |
| 4 | branches: |
| 5 | - main |
| 6 | pull_request: |
| 7 | branches: |
| 8 | - main |
| 9 | - next |
| 10 | |
| 11 | jobs: |
| 12 | lint: |
| 13 | name: lint |
| 14 | runs-on: ubuntu-latest |
| 15 | |
| 16 | |
| 17 | steps: |
| 18 | - uses: actions/checkout@v4 |
| 19 | |
| 20 | - name: Set up Node |
| 21 | uses: actions/setup-node@v4 |
| 22 | with: |
| 23 | node-version: '18' |
| 24 | |
| 25 | - name: Install dependencies |
| 26 | run: yarn install |
| 27 | |
| 28 | - name: Check types |
| 29 | run: ./scripts/lint |
| 30 | test: |
| 31 | name: test |
| 32 | runs-on: ubuntu-latest |
| 33 | |
| 34 | steps: |
| 35 | - uses: actions/checkout@v4 |
| 36 | |
| 37 | - name: Set up Node |
| 38 | uses: actions/setup-node@v4 |
| 39 | with: |
| 40 | node-version: '18' |
| 41 | |
| 42 | - name: Bootstrap |
| 43 | run: ./scripts/bootstrap |
| 44 | |
| 45 | - name: Run tests |
| 46 | run: ./scripts/test |
| 47 | examples: |
| 48 | name: examples |
| 49 | runs-on: ubuntu-latest |
| 50 | |
| 51 | steps: |
| 52 | - uses: actions/checkout@v4 |
| 53 | |
| 54 | - name: Set up Node |
| 55 | uses: actions/setup-node@v4 |
| 56 | with: |
| 57 | node-version: '18' |
| 58 | - name: Install dependencies |
| 59 | run: | |
| 60 | yarn install |
| 61 | |
| 62 | - env: |
| 63 | CLOUDFLARE_ACCOUNT_ID: f037e56e89293a057740de681ac9abbe |
| 64 | CLOUDFLARE_EMAIL: terraform-acceptance-test@cfapi.net |
| 65 | CLOUDFLARE_ZONE_ID: 0da42c8d2132a9ddaf714f9e7c92011 |
| 66 | CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }} |
| 67 | run: | |
| 68 | yarn tsn ./examples/workers/ai/demo.ts |
| 69 | |