Skip to content

Commit

Permalink
(chore) Bump turbo (#291)
Browse files Browse the repository at this point in the history
* (chore) Bump turbo

* Set color flag for testing tasks
  • Loading branch information
denniskigen authored Jun 10, 2024
1 parent 1322268 commit 9d74cc8
Show file tree
Hide file tree
Showing 8 changed files with 202 additions and 179 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: yarn verify

- name: Run build
run: yarn turbo build
run: yarn turbo run build

- name: Upload Artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
run: yarn version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}"

- name: Build
run: yarn turbo build
run: yarn turbo run build


- run: git config user.email "[email protected]" && git config user.name "OpenMRS CI"
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
run: yarn install --immutable

- name: Build
run: yarn turbo build
run: yarn turbo run build
- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
yarn turbo extract-translations
yarn turbo run extract-translations
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,39 +46,39 @@ Once the dev server launches, log in and select a location. You will get redirec
To run tests for all packages, run:

```bash
yarn turbo test
yarn turbo run test
```

To run tests in `watch` mode, run:

```bash
yarn turbo test:watch
yarn turbo run test:watch
```

To run a specific test file, run:

```bash
yarn turbo test -- dashboard
yarn turbo run test -- dashboard
```

The above command will only run tests in the file or files that match the provided string.

You can also run the matching tests from above in watch mode by running:

```bash
yarn turbo test:watch -- dashboard
yarn turbo run test:watch -- dashboard
```

To generate a `coverage` report, run:

```bash
yarn turbo coverage
yarn turbo run coverage
```

By default, `turbo` will cache test runs. This means that re-running tests wihout changing any of the related files will return the cached logs from the last run. To bypass the cache, run tests with the `force` flag, as follows:

```bash
yarn turbo test --force
yarn turbo run test --force
```

### E2E tests
Expand All @@ -96,8 +96,9 @@ yarn test-e2e --headed
```

Read the [e2e testing guide](/e2e/README.md) to learn more about End-to-End tests in this project.

## Building

```sh
yarn build
yarn turbo run build
```
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
"serve": "webpack serve --mode=development",
"build": "webpack --mode production",
"analyze": "webpack --mode=production --env.analyze=true",
"lint": "TIMING=1 eslint src --ext js,jsx,ts,tsx --max-warnings=0",
"lint": "eslint src --ext js,jsx,ts,tsx --max-warnings=0",
"typescript": "tsc",
"test": "jest --config jest.config.js",
"test": "jest --config jest.config.js --color",
"test:watch": "jest --config jest.config.js --watch --color",
"test-e2e": "playwright test",
"verify": "turbo lint typescript coverage",
"verify": "turbo run lint typescript coverage --color",
"coverage": "yarn test --coverage --passWithNoTests",
"postinstall": "husky install",
"extract-translations": "i18next 'src/**/*.component.tsx' --config ./i18next-parser.config.js",
Expand Down Expand Up @@ -104,7 +105,7 @@
"react-i18next": "^11.18.6",
"rxjs": "^6.6.7",
"swc-loader": "^0.2.6",
"turbo": "^1.13.3",
"turbo": "^2.0.3",
"typescript": "^4.9.5",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4"
Expand Down
Loading

0 comments on commit 9d74cc8

Please sign in to comment.