Skip to content

Commit

Permalink
ci: release v0.1.2 @artilleryio/types (#2040)
Browse files Browse the repository at this point in the history
* chore(types): set publish access to public

* fix(types): drop http flow from websocket, add to socketio

* ci: release v0.1.2 @artilleryio/types
  • Loading branch information
kettanaito committed Aug 9, 2023
1 parent 8771d37 commit b17cea6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish-artillery-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
scope: '@artilleryio'
- run: npm ci
- run: npm -w '@artilleryio/types' publish
- run: npm -w '@artilleryio/types' publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 3 additions & 3 deletions packages/types/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,9 @@ export type Scenario = {
* @title Scenario flow
*/
flow: Array<
| HttpFlow
| WebSocketFlow
| ({
loop: Array<HttpFlow | WebSocketFlow>;
loop: Array<WebSocketFlow>;
whileTrue?: string;
} & (FixedLoop | DynamicLoop))
>;
Expand All @@ -270,9 +269,10 @@ export type Scenario = {
* @title Scenario flow
*/
flow: Array<
| HttpFlow
| SocketIoFlow
| ({
loop: Array<SocketIoFlow>;
loop: Array<HttpFlow | SocketIoFlow>;
whileTrue?: string;
} & (FixedLoop | DynamicLoop))
>;
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@artilleryio/types",
"version": "0.1.1",
"version": "0.1.2",
"files": [
"./definitions.ts",
"./schema.json"
Expand Down
12 changes: 8 additions & 4 deletions packages/types/test/simple.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,28 @@ config:
tap.end();
});

tap.test('supports HTTP flow properties for "websockets" engine', (tap) => {
tap.test('supports HTTP flow properties for "socketio" engine', (tap) => {
const errors = validateTestScript(`
config:
target: http://localhost:3000
phases:
- duration: 10
rampTo: 50
scenarios:
- engine: websocket
- engine: socketio
flow:
- get:
url: /resource
- think: 500
- send: "hello"
- emit:
channel: "echoResponse"
data: "hello"
- loop:
- post:
url: /resource
- send: "world"
- emit:
channel: "anotherChannel"
data: "world"
count: 5
`);

Expand Down

0 comments on commit b17cea6

Please sign in to comment.