|
30 | 30 | run: cargo install -q worker-build && worker-build |
31 | 31 |
|
32 | 32 | - name: test |
33 | | - run: cargo test -- --nocapture |
| 33 | + run: cargo test --workspace --exclude smoke_tests -- --nocapture |
34 | 34 | env: |
35 | 35 | RUST_BACKTRACE: full |
36 | 36 |
|
|
47 | 47 | working-directory: libs/napi |
48 | 48 | run: yarn build |
49 | 49 |
|
| 50 | + smoke-test: |
| 51 | + name: smoke test |
| 52 | + needs: |
| 53 | + - build |
| 54 | + runs-on: ubuntu-22.04 |
| 55 | + steps: |
| 56 | + - name: checkout |
| 57 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 |
| 58 | + |
| 59 | + - name: setup environment |
| 60 | + uses: ./.github/actions/setup |
| 61 | + |
| 62 | + - name: run containers |
| 63 | + working-directory: libs/smoke_tests/ |
| 64 | + run: docker compose -f docker-compose.yaml up -d |
| 65 | + |
| 66 | + - uses: JarvusInnovations/background-action@v1 |
| 67 | + name: run test server in background |
| 68 | + with: |
| 69 | + run: cargo run |
| 70 | + working-directory: tests/test-server |
| 71 | + wait-on: http-get://127.0.0.1:4000 |
| 72 | + tail: true |
| 73 | + wait-for: 10m |
| 74 | + log-output-if: failure |
| 75 | + log-output: true |
| 76 | + |
| 77 | + - uses: JarvusInnovations/background-action@v1 |
| 78 | + name: run gateway in background (binary) |
| 79 | + with: |
| 80 | + run: cargo run --bin conductor -- ./libs/smoke_tests/test_gw.yaml |
| 81 | + wait-on: http-get://127.0.0.1:9000/graphql |
| 82 | + tail: true |
| 83 | + wait-for: 15m |
| 84 | + log-output-if: failure |
| 85 | + log-output: true |
| 86 | + |
| 87 | + - name: run tests (binary) |
| 88 | + working-directory: libs/smoke_tests/ |
| 89 | + run: cargo test --features binary -- --nocapture |
| 90 | + env: |
| 91 | + CONDUCTOR_URL: http://127.0.0.1:9000 |
| 92 | + |
| 93 | + - uses: the-guild-org/shared-config/setup@main |
| 94 | + name: setup env (wasm) |
| 95 | + with: |
| 96 | + nodeVersion: 20 |
| 97 | + packageManager: pnpm |
| 98 | + workingDirectory: bin/cloudflare_worker |
| 99 | + packageManagerVersion: 8 |
| 100 | + |
| 101 | + - uses: JarvusInnovations/background-action@v1 |
| 102 | + name: run gateway in background (wasm) |
| 103 | + with: |
| 104 | + working-directory: bin/cloudflare_worker |
| 105 | + run: pnpm start:smoke |
| 106 | + wait-on: http-get://127.0.0.1:8787/graphql |
| 107 | + tail: true |
| 108 | + wait-for: 15m |
| 109 | + log-output-if: failure |
| 110 | + log-output: true |
| 111 | + |
| 112 | + - name: run tests (wasm) |
| 113 | + working-directory: libs/smoke_tests/ |
| 114 | + run: cargo test --features wasm -- --nocapture |
| 115 | + env: |
| 116 | + CONDUCTOR_URL: http://127.0.0.1:8787 |
| 117 | + |
50 | 118 | graphql-over-http: |
51 | 119 | runs-on: ubuntu-22.04 |
52 | 120 | steps: |
@@ -151,7 +219,7 @@ jobs: |
151 | 219 | - name: run panic free analyzer |
152 | 220 | run: cargo panic-analyzer > ./panic-audit.md |
153 | 221 | env: |
154 | | - IGNORED_CRATES: e2e_tests,benches,server |
| 222 | + IGNORED_CRATES: smoke_tests,e2e_tests,benches,server |
155 | 223 | IGNORED_FILES: ./plugins/jwt_auth/src/test.rs |
156 | 224 |
|
157 | 225 | - name: comment on pull request |
|
0 commit comments