Skip to content

Commit

Permalink
chore: remove integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timofei-iatsenko committed Jan 15, 2025
1 parent cea4275 commit 6ea6c4a
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 65 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/main-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ jobs:
- name: Test Public Typings
run: yarn test:tsd

- name: Integration Testing
run: yarn test:integration

- name: E2E Testing
run: yarn test:e2e

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ jobs:
- name: Linting & Types
run: yarn lint:all

- name: Integration Testing
run: yarn test:integration

- name: Creates local .npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

Expand Down
82 changes: 42 additions & 40 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@ This project and everyone participating in it are governed by the [Code of Condu

The documentation is based on [Docusaurus](https://docusaurus.io/) framework. Source inside the [website](https://github.com/lingui/js-lingui/tree/main/website) directory.

- Go to the `website` directory:
- Go to the `website` directory:

```sh
cd website
```

- Install dependencies:

```sh
yarn install
```
```sh
yarn install
```

- To build the docs, watch for changes and preview documentation locally at [http://localhost:3000/](http://localhost:3000/):

```sh
yarn start
```
```sh
yarn start
```

- It's also possible to run `yarn build` for single build. Incremental builds are much faster than the first one as only changed files are built.

- Please lint and validate the documentation before submitting any changes:

```sh
yarn lint
yarn checkFormat
```
```sh
yarn lint
yarn checkFormat
```

## Contributing the code

Expand Down Expand Up @@ -68,10 +68,6 @@ This project uses [yarn][yarninstall] package manager. Please follow [official][
yarn test
```

> **Note**
> If you are using an IDE to run test make sure to use the right Jest config.
> For unit tests use `-c jest.config.js`. Integration tests use build packages (created using `yarn release:build`) and config `-c jest.config.integration.js`. See [package.json](./package.json) for more info.
### Using development version in your project

After you successfully fix a bug or add a new feature, you most probably want to test it in a real-world project as soon as possible.
Expand All @@ -84,44 +80,50 @@ There are two documented ways to do this: first is a generic way described in th

1. Run `verdaccio` locally in docker (follow [verdaccio guide](https://verdaccio.org/docs/en/what-is-verdaccio.html) if you don't want to run it in Docker):

```sh
docker run -d -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
```
```sh
docker run -d -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
```

> Make sure that your verdaccio user is the same that appears in verdacio-release.js script.
> Make sure that your verdaccio user is the same that appears in verdacio-release.js script.
2. Publish local build of packages to registry. Run local release script:

```sh
yarn verdaccio:release
```
```sh
yarn verdaccio:release
```

3. If you enter inside http://0.0.0.0:4873 (verdaccio instance), you will see your packages published, so you're ready to install them.

4. Inside your project, run:

with NPM:
```sh
# Point to your local registry
npm config set registry http://0.0.0.0:4873/
# Run update-by-scope will update all @lingui packages
npx update-by-scope @lingui
```
with Yarn Classic (1.*):
```sh
yarn upgrade --scope @lingui --registry http://0.0.0.0:4873/ --latest
```
with Yarn Berry:
```sh
YARN_NPM_REGISTRY_SERVER=http://0.0.0.0:4873/ yarn up "@lingui/*"
```
with NPM:

```sh
# Point to your local registry
npm config set registry http://0.0.0.0:4873/
# Run update-by-scope will update all @lingui packages
npx update-by-scope @lingui
```

with Yarn Classic (1.\*):

```sh
yarn upgrade --scope @lingui --registry http://0.0.0.0:4873/ --latest
```

with Yarn Berry:

```sh
YARN_NPM_REGISTRY_SERVER=http://0.0.0.0:4873/ yarn up "@lingui/*"
```

5. After you make some changes, you need to run the same process. (Releasing + yarn upgrade)

6. When finished testing, restore default registry (only for NPM)

```sh
npm config set registry https://registry.npmjs.org/
```
```sh
npm config set registry https://registry.npmjs.org/
```

#### Testing changes using the React Native example

Expand Down
17 changes: 0 additions & 17 deletions jest.config.integration.js

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
"test": "jest",
"test:ci": "jest --ci --runInBand",
"test:ci:coverage": "yarn test:ci --coverage",
"test:integration": "yarn node --experimental-vm-modules $(yarn bin jest) -c jest.config.integration.js",
"test:e2e": "yarn workspaces foreach -p run test:e2e",
"test:tsd": "jest -c jest.config.types.js",
"test:all": "yarn test && yarn test:integration && yarn test:e2e && yarn test:tsd",
"test:all": "yarn test && yarn test:e2e && yarn test:tsd",
"lint:types": "tsc",
"lint:eslint": "eslint ./packages",
"lint:all": "yarn lint:eslint && yarn lint:types",
Expand Down

0 comments on commit 6ea6c4a

Please sign in to comment.