Skip to content

Commit 698e312

Browse files
authored
consolidate examples and fixtures (#89)
* Add websocket example and tests * consolidate examples and tests
1 parent 5e2872d commit 698e312

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+11842
-767
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,7 @@ jobs:
2222
cache: 'npm'
2323

2424
- name: Install dependencies and run tests for all fixtures
25-
run: |
26-
for fixture in fixtures/*/; do
27-
if [ -f "$fixture/package.json" ]; then
28-
echo "Installing dependencies for $fixture"
29-
cd "$fixture"
30-
npm install
31-
echo "Running tests for $fixture"
32-
npm run test
33-
cd - > /dev/null
34-
fi
35-
done
25+
run: npm run test
3626
timeout-minutes: 10
3727

3828

@@ -54,7 +44,7 @@ jobs:
5444

5545
- name: Type check all fixtures
5646
run: |
57-
for fixture in fixtures/*/; do
47+
for fixture in examples/*/; do
5848
if [ -f "$fixture/tsconfig.json" ]; then
5949
echo "Type checking $fixture"
6050
cd "$fixture"

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Thanks for being interested in contributing to @cloudflare/containers!
55
## Developing
66

77
1. Clone the repo and install dependencies with `npm i`
8-
2. The code for the Container class is in `src/lib`, primarily in `container.ts`. You can use the examples in `example` or `example-node` to test your changes, either locally by running `npx wrangler dev`, which will automatically pick up changes to `src/lib`, or by deploying your container with `npx wrangler deploy`.
9-
3. If your PR will make user-impacting changes, you can add a `patch` changeset by running `npx changesets@cli`. This will ensure your change is included in our changelog.
8+
2. The code for the Container class is in `src/lib`, primarily in `container.ts`. You can use `examples` to test your changes, either locally by running `npx wrangler dev`, which will automatically pick up changes to `src/lib`, or by deploying your container with `npx wrangler deploy`.
9+
3. Add tests (located in `examples`) and run tests with `npm run test`.
10+
4. If your PR will make user-impacting changes, you can add a `patch` changeset by running `npx changesets@cli`. This will ensure your change is included in our changelog.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)