Skip to content

Commit

Permalink
Merge branch 'winglang:main' into message-fanout
Browse files Browse the repository at this point in the history
  • Loading branch information
marciocadev authored Feb 19, 2024
2 parents d9744f2 + 9217b9a commit 2740526
Show file tree
Hide file tree
Showing 58 changed files with 2,066 additions and 83 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .github/workflows/bedrock-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- main
paths:
- bedrock/**
paths-ignore:
- bedrock/package-lock.json
jobs:
build-bedrock:
runs-on: ubuntu-latest
Expand Down
39 changes: 9 additions & 30 deletions .github/workflows/canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
Expand All @@ -46,27 +46,6 @@ jobs:
- name: Test
run: wing test
working-directory: checks
canary-containers:
name: Test containers
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
sparse-checkout: containers
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
- name: Install dependencies
run: npm install --include=dev
working-directory: containers
- name: Test
run: wing test
working-directory: containers
canary-fifoqueue:
name: Test fifoqueue
runs-on: ubuntu-latest
Expand All @@ -78,7 +57,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
Expand All @@ -99,7 +78,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
Expand Down Expand Up @@ -141,7 +120,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
Expand All @@ -162,7 +141,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
Expand All @@ -183,7 +162,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
Expand All @@ -204,7 +183,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
Expand All @@ -225,7 +204,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/checks-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- main
paths:
- checks/**
paths-ignore:
- checks/package-lock.json
jobs:
build-checks:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/containers-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- main
paths:
- containers/**
paths-ignore:
- containers/package-lock.json
jobs:
build-containers:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/fifoqueue-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- main
paths:
- fifoqueue/**
paths-ignore:
- fifoqueue/package-lock.json
jobs:
build-fifoqueue:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/github-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- main
paths:
- github/**
paths-ignore:
- github/package-lock.json
jobs:
build-github:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ngrok-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- main
paths:
- ngrok/**
paths-ignore:
- ngrok/package-lock.json
jobs:
build-ngrok:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/postgres-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- main
paths:
- postgres/**
paths-ignore:
- postgres/package-lock.json
jobs:
build-postgres:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/redis-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- main
paths:
- redis/**
paths-ignore:
- redis/package-lock.json
jobs:
build-redis:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sagemaker-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- main
paths:
- sagemaker/**
paths-ignore:
- sagemaker/package-lock.json
jobs:
build-sagemaker:
runs-on: ubuntu-latest
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/vite-pull.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: vite-pull
on:
pull_request:
paths:
- vite/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
sparse-checkout: vite
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
- name: Install dependencies
run: npm install
working-directory: vite
- name: Test
run: wing test
working-directory: vite
38 changes: 38 additions & 0 deletions .github/workflows/vite-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: vite-release
on:
push:
branches:
- main
paths:
- vite/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
sparse-checkout: vite
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Install winglang
run: npm i -g winglang
- name: Install dependencies
run: npm install
working-directory: vite
- name: Test
run: wing test
working-directory: vite
- name: Pack
run: wing pack
working-directory: vite
- name: Publish
run:
npm publish --access=public --registry https://registry.npmjs.org --tag
latest *.tgz
working-directory: vite
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/websockets-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- main
paths:
- websockets/**
paths-ignore:
- websockets/package-lock.json
jobs:
build-websockets:
runs-on: ubuntu-latest
Expand Down
7 changes: 5 additions & 2 deletions canary.w
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bring fs;

pub class CanaryWorkflow {
new(workflowdir: str, libs: Array<str>) {
new(workflowdir: str, libs: Array<str>, skipLibs: Array<str>?) {
let testLibSteps = (lib: str): Array<Json> => {
return [
{
Expand All @@ -15,7 +15,7 @@ pub class CanaryWorkflow {
name: "Setup Node.js",
uses: "actions/setup-node@v3",
with: {
"node-version": "18.x",
"node-version": "20.x",
"registry-url": "https://registry.npmjs.org",
},
},
Expand All @@ -38,6 +38,9 @@ pub class CanaryWorkflow {

let jobs = MutJson {};
for lib in libs {
if (skipLibs ?? []).contains(lib) {
continue;
}
jobs.set("canary-{lib}", {
name: "Test {lib}",
"runs-on": "ubuntu-latest",
Expand Down
4 changes: 2 additions & 2 deletions checks/check.w
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub class Check impl ICheck {
* Invokes the check and returns it's result
*/
pub inflight run(): r.CheckResult {
let result = this.invoker.invoke("");
let result = this.invoker.invoke("")!;
return r.CheckResult.fromJson(Json.parse(result));
}

Expand All @@ -98,4 +98,4 @@ pub class Check impl ICheck {
pub inflight latest(): r.CheckResult? {
return this.results.latest(this.checkid);
}
}
}
4 changes: 2 additions & 2 deletions checks/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions checks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@winglibs/checks",
"version": "0.0.6",
"version": "0.0.7",
"description": "Cloud checks",
"publishConfig": {
"access": "public",
Expand All @@ -21,4 +21,4 @@
"name": "Elad Ben-Israel"
},
"license": "MIT"
}
}
1 change: 1 addition & 0 deletions containers/containers.test.w
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ let httpGet = inflight (url: str?): str => {

test "access public url" {
let helloBody = httpGet(hello.publicUrl);
log(helloBody);
assert(helloBody.contains(message));

let echoBody = httpGet(echo.publicUrl);
Expand Down
4 changes: 2 additions & 2 deletions containers/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion containers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@winglibs/containers",
"version": "0.0.20",
"version": "0.0.21",
"description": "Container support for Wing",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions fifoqueue/api.w
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ pub struct PushOptions {
pub struct SetConsumerOptions extends cloud.QueueSetConsumerOptions {}

pub interface IFifoQueue {
setConsumer(handler: inflight (str): void, options: SetConsumerOptions?);
inflight push(message: str, options: PushOptions);
setConsumer(handler: inflight (str): void, options: SetConsumerOptions?): void;
inflight push(message: str, options: PushOptions): void;
}
Loading

0 comments on commit 2740526

Please sign in to comment.