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