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