Skip to content

Commit

Permalink
Merge pull request miragejs#2395 from miragejs/monorepo
Browse files Browse the repository at this point in the history
Restructure into monorepo
  • Loading branch information
SergeAstapov authored Apr 22, 2022
2 parents 9e55e12 + d99571d commit 2b440f4
Show file tree
Hide file tree
Showing 279 changed files with 3,860 additions and 14,729 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
directory: "/packages/ember-cli-mirage/"
schedule:
interval: daily
52 changes: 44 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ jobs:
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Run Browser Tests
run: yarn test:ember
- name: Run Node Tests
run: yarn test:test-projects
run: yarn workspace ember-cli-mirage lint
- name: Run Tests
run: yarn workspace ember-cli-mirage test:ember

floating:
name: "Floating Dependencies"
Expand All @@ -46,10 +44,47 @@ jobs:
cache: yarn
- name: Install Dependencies
run: yarn install --no-lockfile
- name: Run Browser Tests
- name: Run Tests
run: yarn test:ember
- name: Run Node Tests
run: yarn test:test-projects
working-directory: packages/ember-cli-mirage

test-app-01:
name: "Tests - Basic App"
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 14.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn workspace basic-app lint
- name: Run Tests
run: yarn workspace basic-app test

test-app-02:
name: "Tests - App That Excludes Mirage"
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 14.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn workspace app-that-excludes-mirage lint
- name: Run Tests
run: yarn workspace app-that-excludes-mirage test

try-scenarios:
name: ${{ matrix.try-scenario }}
Expand Down Expand Up @@ -84,3 +119,4 @@ jobs:
run: yarn install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
working-directory: packages/ember-cli-mirage
9 changes: 7 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ jobs:
with:
node-version: 14.x
cache: yarn

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Lint
run: yarn lint
run: yarn workspace ember-cli-mirage lint

- name: Run Browser Tests
run: yarn test:ember
run: yarn workspace ember-cli-mirage test:ember

- name: deploy docs
run: node_modules/.bin/ember deploy production
working-directory: packages/ember-cli-mirage
11 changes: 8 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ jobs:
with:
node-version: 14.x
cache: yarn

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Lint
run: yarn lint
- name: Run Browser Tests
run: yarn test:ember
run: yarn workspace ember-cli-mirage lint

- name: Run Tests
run: yarn workspace ember-cli-mirage test:ember

- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
tag: next
working-directory: packages/ember-cli-mirage
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.22.7
14.19.1
3 changes: 0 additions & 3 deletions CHANGELOG.md

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
26 changes: 22 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ To make more substantial changes, you'll want to be able to develop the docs sit

```shell
git clone git@github.com:miragejs/ember-cli-mirage.git
cd ember-cli-mirage
yarn install # (or npm install)
cd ember-cli-mirage/packages/ember-cli-mirage
yarn install
ember s
```

Expand All @@ -29,9 +29,27 @@ To help out with Mirage development, first pull down the project locally and ver

```
git clone git@github.com:[your-name]/ember-cli-mirage.git
cd ember-cli-mirage
yarn install # (or npm install)
cd ember-cli-mirage/packages/ember-cli-mirage
yarn install
ember test
```

If all tests pass, you should be all set. Checkout a new branch to start developing, then submit a PR when you're ready!

## Linting

* `yarn lint`
* `yarn lint:fix`

## Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

## Running the dummy application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
9 changes: 0 additions & 9 deletions LICENSE.md

This file was deleted.

1 change: 1 addition & 0 deletions LICENSE.md
46 changes: 0 additions & 46 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
66 changes: 66 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Release Process

Releases are mostly automated using
[release-it](https://github.com/release-it/release-it/) and
[lerna-changelog](https://github.com/lerna/lerna-changelog/).

## Preparation

Since the majority of the actual release process is automated, the primary
remaining task prior to releasing is confirming that all pull requests that
have been merged since the last release have been labeled with the appropriate
`lerna-changelog` labels and the titles have been updated to ensure they
represent something that would make sense to our users. Some great information
on why this is important can be found at
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

* breaking - Used when the PR is considered a breaking change.
* enhancement - Used when the PR adds a new feature or enhancement.
* bug - Used when the PR fixes a bug included in a previous release.
* documentation - Used when the PR adds or updates documentation.
* internal - Used for internal changes that still require a mention in the
changelog/release notes.

## Release

Once the prep work is completed, the actual release is straight forward:

* First, ensure that you have installed your projects dependencies:

```sh
yarn install
```

* Second, ensure that you have obtained a
[GitHub personal access token][generate-token] with the `repo` scope (no
other permissions are needed). Make sure the token is available as the
`GITHUB_AUTH` environment variable.

For instance:

```bash
export GITHUB_AUTH=abc123def456
```

[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable

* Do your release.

```sh
yarn release
```

* Push the changes to GitHub and let CI publish the actual package to the registry:

```sh
git push origin --follow-tags
```

[release-it](https://github.com/release-it/release-it/) manages the actual
release process. It will prompt you to choose the version number after which
you will have the chance to hand tweak the changelog to be used (for the
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
pushing the tag and commits, etc.
Loading

0 comments on commit 2b440f4

Please sign in to comment.