Skip to content

Commit

Permalink
tests: Add tons of integration tests. (#88)
Browse files Browse the repository at this point in the history
* Remove prop.

* Move to int tests.

* Add init tests.

* Start testing node.

* Update snap.

* Use make in CI.

* Check home dir.

* Update snap.

* Handle more node failures.

* Test node types.

* Move code to path utils.

* Add node 18.

* Start on system.

* Start on system.ls

* Log deps install.

* Test pass through args.

* Test scopes.

* Test deps.

* new: Wrap process utils into a `Command` struct. (#89)

* First pass.

* Second pass.

* Fix npm install.

* Add more fixtures.

* Use a sandbox approach.

* Fix race conditions.

* Test more node stuff.

* Always use sandbox.

* Test install.

* Standardize paths in logs.

* Add some windows conditions.

* Test syncing.

* Fix workspace race conditions for root `tsconfig.json` (#90)

* Start on things.

* Use write.

* Handle dirty.

* Fix tests.

* Standardize paths for tsconfig.

* Test env vars.

* Test cwd.

* Test retry count.

* Test caching.

* Update cargo deps.

* Fix teardown.

* Add internet connection detection.

* Allow input for commands.

* Use modified time for svn.

* Add local files to hashing.

* Only load root package.json/tsconfig.json once (#91)

* Move root code around.

* Refactor install node deps.

* Refactor tsconfig.

* Fix issues.

* Fix workspace.

* Copy config.

* Fix windows tests.

* Test windows batch files.

* And early aborting.

* Drop node 12.

* Fix linux tests.

* Bump.

* Add quiet back.

* Better handling of failures.

* Reduce logging.

* Fix windows tests.

* Enable logging.

* Disable fail fast.

* Test specific tests.

* Add logging.

* Stream output.

* More logging.

* Clean up pm tools.

* Log vars.

* Stuff.

* new: Split toolchain into many traits. (#92)

* Start splitting apart traits.

* Rework tool/node.

* Add npm and yarn.

* Better npm global handling.

* Clean up impls.

* More trait work.

* Add is_executable.

* Try using generics.

* Add generics and fix package managers.

* Polish and fixes.

* Test fixes.

* Polish.

* CI fixes.

* Improve process logging.

* Enable debugging.

* Undo testing.
  • Loading branch information
milesj authored May 12, 2022
1 parent 11ad712 commit 233935d
Show file tree
Hide file tree
Showing 217 changed files with 5,540 additions and 2,184 deletions.
5 changes: 4 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ mjs/
umd/
*.min.js
*.map
*.snap
*.snap

# Test fixtures
/tests
3 changes: 2 additions & 1 deletion .github/workflows/moon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: ['12.22.9', '14.19.0', '16.14.0']
node-version: ['14.19.0', '16.14.0', '18.0.0']
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -50,4 +50,5 @@ jobs:
command: run
args: -- --logLevel trace ci
env:
CLICOLOR_FORCE: true
MOON_NODE_VERSION: ${{ matrix.node-version }}
26 changes: 19 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ jobs:
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
command: install
args: --debug --force cargo-make
- uses: actions-rs/cargo@v1
with:
command: make
args: format
lint:
name: Lint
runs-on: ${{ matrix.os }}
Expand All @@ -53,15 +57,19 @@ jobs:
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets -- --deny warnings
command: install
args: --debug --force cargo-make
- uses: actions-rs/cargo@v1
with:
command: make
args: lint
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: true
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
Expand All @@ -77,10 +85,14 @@ jobs:
with:
toolchain: 1.60.0
profile: minimal
- uses: actions-rs/cargo@v1
with:
command: install
args: --debug --force cargo-make
- uses: actions-rs/cargo@v1
with:
command: build
- uses: actions-rs/cargo@v1
with:
command: test
args: --workspace
command: make
args: test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ packages/*/moon
packages/*/moon.exe
/moon
/moon.exe

# Moon tests/fixtures
tests/fixtures/*/.moon/cache
tests/fixtures/*/package-lock.json
tests/fixtures/*/pnpm-lock.yaml
tests/fixtures/*/yarn.lock
2 changes: 2 additions & 0 deletions .yarn/versions/5180ba6c.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
releases:
"@moonrepo/runtime": patch
141 changes: 118 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 233935d

Please sign in to comment.