This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,70 @@ | ||
# HiringFulll | ||
<div align="center"> | ||
|
||
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a> | ||
# Fulll 🤝 Hiring process | ||
|
||
✨ **This workspace has been generated by [Nx, Smart Monorepos · Fast CI.](https://nx.dev)** ✨ | ||
**My work for the [Fulll hiring process](https://github.com/fulll/hiring).** | ||
|
||
## Integrate with editors | ||
✨ This workspace has been generated by Nx, Smart Monorepos · Fast CI. ✨ | ||
|
||
Enhance your Nx experience by installing [Nx Console](https://nx.dev/nx-console) for your favorite editor. Nx Console | ||
provides an interactive UI to view your projects, run tasks, generate code, and more! Available for VSCode, IntelliJ and | ||
comes with a LSP for Vim users. | ||
</div> | ||
|
||
## Start the application | ||
--- | ||
|
||
Run `npx nx serve fizzbuzz` to start the development server. Happy coding! | ||
## Features | ||
|
||
## Build for production | ||
- Fizzbuzz algorithm and CLI (Algo test) | ||
- Vehicle fleet CLI (Backend test) | ||
- ~6-7 hours of work on it | ||
|
||
Run `npx nx build fizzbuzz` to build the application. The build artifacts are stored in the output directory (e.g. `dist/` or `build/`), ready to be deployed. | ||
## Architecture | ||
|
||
## Running tasks | ||
This repository is a monorepo managed by [Nx](https://nx.dev/). | ||
|
||
To execute tasks with Nx use the following syntax: | ||
It contains libraries for core programs, and client applications to consume these libraries: | ||
|
||
``` | ||
npx nx <target> <project> <...options> | ||
``` | ||
- Libraries | ||
- Fizzbuzz | ||
- Vehicle Fleet | ||
- Applications | ||
- Fizzbuzz CLI | ||
- Fizzbuzz CLI (end-to-end tests) | ||
- Fleet CLI | ||
- Fleet CLI (end-to-end tests) | ||
|
||
You can also run multiple targets: | ||
> This way we can imagine creating new applications (like APIs or GUIs) to also consume the libraries. | ||
``` | ||
npx nx run-many -t <target1> <target2> | ||
``` | ||
## Commands | ||
|
||
..or add `-p` to filter specific projects | ||
```shell | ||
# Install dependencies | ||
pnpm install | ||
|
||
``` | ||
npx nx run-many -t <target1> <target2> -p <proj1> <proj2> | ||
``` | ||
# Lint, test (including e2e) or build all projects | ||
pnpm nx run-many --target=lint | ||
pnpm nx run-many --target=test | ||
pnpm nx run-many --target=build | ||
|
||
Targets can be defined in the `package.json` or `projects.json`. Learn more [in the docs](https://nx.dev/features/run-tasks). | ||
# Run Fizzbuzz CLI | ||
pnpm run fizzbuzz-cli | ||
pnpm run fizzbuzz-cli -- --args=--max=200 | ||
|
||
## Set up CI! | ||
# Run Fleet CLI | ||
# (you need to set environment variable MONGO_URL first) | ||
pnpm run fleet-cli -- --args=create,fleet-1 # example to create a fleet | ||
``` | ||
|
||
Nx comes with local caching already built-in (check your `nx.json`). On CI you might want to go a step further. | ||
## Q&A | ||
|
||
- [Set up remote caching](https://nx.dev/features/share-your-cache) | ||
- [Set up task distribution across multiple machines](https://nx.dev/nx-cloud/features/distribute-task-execution) | ||
- [Learn more how to setup CI](https://nx.dev/recipes/ci) | ||
- **For code quality, you can use some tools : which one and why (in a few words) ?** | ||
|
||
## Explore the project graph | ||
I am using ESLint (as part of the Nx workspace) to lint the code during the development and inside the CI. | ||
I have also prepared a step inside the GitHub action to run a SonarCloud analysis in the CI, but we can | ||
connect a similar service too (Codecov, Coveralls, etc.). Prettier is also installed to improve code readibility. | ||
We could also add a pre-commit Git hook to lint the code right before a commit (using husky/lint-staged). | ||
|
||
Run `npx nx graph` to show the graph of the workspace. | ||
It will show tasks that you can run with Nx. | ||
|
||
- [Learn more about Exploring the Project Graph](https://nx.dev/core-features/explore-graph) | ||
- **You can consider to setup a ci/cd process : describe the necessary actions in a few words** | ||
|
||
## Connect with us! | ||
At the moment I have created a basic pipeline which runs lint, test and build targets through Nx. This ensures | ||
that only affected code is processed each commit/PR (very interesting for monorepos like this one). | ||
|
||
- [Join the community](https://nx.dev/community) | ||
- [Subscribe to the Nx Youtube Channel](https://www.youtube.com/@nxdevtools) | ||
- [Follow us on Twitter](https://twitter.com/nxdevtools) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters