Skip to content

Commit

Permalink
Update GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
ppcano committed Jul 27, 2023
1 parent 4096ca3 commit 34f4a6a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: |
yarn --frozen-lockfile
- name: Transpile and bundle test script
run: |
yarn webpack
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm start
- name: Run local k6 test
uses: grafana/[email protected]
with:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@ To generate a TypeScript project that includes the dependencies and initial conf
Clone the generated repository on your local machine, move to the project root folder and install the dependencies defined in [`package.json`](./package.json)

```bash
$ yarn install
npm install
```

## Running the test

To run a test written in TypeScript, we first have to transpile the TypeScript code into JavaScript and bundle the project

```bash
$ yarn webpack
npm start
```

This command creates the final test files to the `./dist` folder.

Once that is done, we can run our script the same way we usually do, for instance:

```bash
$ k6 run dist/get-200-status-test.js
k6 run dist/get-200-status-test.js
```

## Writing own tests
Expand Down

0 comments on commit 34f4a6a

Please sign in to comment.