Skip to content

Commit

Permalink
Use npm in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
w1am committed Dec 16, 2024
1 parent f1396c3 commit 1da39c3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build_and_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install
run: yarn
run: npm install
- name: Linting
run: yarn lint
run: npm run lint
- name: Build on Ubuntu
run: yarn build
run: npm run build
- name: All generated code is commited
run: |
git update-index --refresh
Expand All @@ -41,6 +41,6 @@ jobs:
- name: NodeJS version
run: node -v
- name: Install
run: yarn
run: npm install
- name: Build
run: yarn build
run: npm run build
6 changes: 3 additions & 3 deletions .github/workflows/test_ee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ jobs:
username: ${{ secrets.CLOUDSMITH_CICD_USER }}
password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}
- name: Install
run: yarn
run: npm install
- name: Build
run: yarn build
run: npm run build
- name: Run Tests
run: yarn test ${{ matrix.group.path }} --ci --run-in-band --forceExit
run: npm run test ${{ matrix.group.path }} --ci --run-in-band --forceExit
env:
KURRENT_IMAGE: eventstore-ee:${{ env.KURRENT_VERSION }}
EVENTSTORE_CLOUD_ID: ${{ secrets.EVENTSTORE_CLOUD_ID }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ jobs:
- name: NodeJS version
run: node -v
- name: Install
run: yarn
run: npm install
- name: Build
run: yarn build
run: npm run build
- name: Run Tests
run: yarn test ${{ matrix.group.path }} --ci --run-in-band --forceExit
run: npm run test ${{ matrix.group.path }} --ci --run-in-band --forceExit
env:
KURRENT_IMAGE: eventstore-ce:${{ inputs.version }}
EVENTSTORE_CLOUD_ID: ${{ secrets.eventstore_cloud_id }}
Expand Down
26 changes: 13 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,65 +15,65 @@ Development is done on the `master` branch. We attempt to do our best to ensure
```
2. Install all necessary dependencies:
```bash
yarn install
npm install
```
3. Build the project for the first time:
```bash
yarn build
npm run build
```
In case of build errors, refresh your setup with:
```bash
npx lerna clean -y && yarn install
npx lerna clean -y && npm run install
```

## Development Practices

**Code Compilation:**
- Standard Build:
```bash
yarn run build
npm run build
```
- Continuous Build on Changes:
```bash
yarn run build:watch
npm run build:watch
```

**Testing and Linting:**
- Run the complete test suite:
```bash
yarn run test
npm run test
```
- Perform code style checks:
```bash
yarn run lint
npm run lint
```

### Tests

Tests are written using [Jest] and require [Docker] and [Docker Compose] to be installed. Then run test with:

```shell script
yarn test
npm run test
```

Tests can be filtered by prepending the test file or folder to the command

```shell script
$ yarn test connection // all connection tests
$ yarn test ReadAll // only the ReadAll tests
$ npm run test connection // all connection tests
$ npm run test ReadAll // only the ReadAll tests
```

To get debug information when running tests use the `test:debug` command.

```shell script
$ yarn test:debug // debug all tests
$ yarn test:debug ReadAll // only the ReadAll tests
$ npm run test:debug // debug all tests
$ npm run test:debug ReadAll // only the ReadAll tests
```

Specific docker images can be specified via the enviroment variable `KURRENT_IMAGE`.

```shell script
$ yarn cross-env KURRENT_IMAGE=77d63f3f0ab3 jest
$ npx cross-env KURRENT_IMAGE=77d63f3f0ab3 jest
```

See [Jest] documentation for more options.
Expand Down

0 comments on commit 1da39c3

Please sign in to comment.