diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 9cb49b882..000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: docs - -on: - push: - branches: - - main - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - cache: yarn - node-version-file: package.json - - run: yarn --frozen-lockfile - - run: yarn typedoc - - name: Deploy - uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./doc \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d04860a41..023031319 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,21 +7,14 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - with: - ref: ${{ github.event.pull_request.head.sha }} + - uses: jdx/mise-action@v3.5.1 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: cache: yarn - node-version-file: package.json - - run: yarn --immutable - - run: yarn lint --max-warnings=0 - - name: Check if barrels are up to date - run: yarn ctix && [ -z "$(git status --porcelain)" ] - - run: yarn test --coverage - - run: yarn integration --coverage + - run: mise run ci - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -34,3 +27,18 @@ jobs: directory: ./coverage-integration flags: integration fail_ci_if_error: true + docs: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: jdx/mise-action@v3.5.1 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + cache: yarn + - run: mise run typedoc + - name: Deploy + if: ${{ github.ref == 'refs/heads/main' }} + uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./doc diff --git a/.yarnrc.yml b/.yarnrc.yml index e7b145d0a..3186f3f07 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,2 +1 @@ -yarnPath: .yarn/releases/yarn-4.12.0.cjs -nodeLinker: node-modules \ No newline at end of file +nodeLinker: node-modules diff --git a/README.md b/README.md index b0d9f05f0..95c4b43a2 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,16 @@ Entity is not limited in where it can or should be used, but was designed for us Note: The entity framework instance should not be shared across multiple requests since it contains a unique memoized [Dataloader](https://github.com/graphql/dataloader#class-dataloader). A long-lived instance is prone to data synchronization issues, especially when the application is scaled horizontally and multiple shared caches would exist for the same data. +## Contributing + +We control development tooling versions using [mise-en-place](https://mise.jdx.dev). If you have it installed, then: + +- Running `mise run ci` will run all tests that our CI environment will run. +- Running `mise t` will show a list of mise tasks you can run with `mise run `. +- Running `mise en .` will enter a shell environment which includes node and yarn. + +If you don't have `mise` installed, [you can install it](https://mise.jdx.dev/installing-mise.html#https-mise-run) as easily as running `curl https://mise.run/zsh | sh`. + ## Releasing To release a new version: diff --git a/mise.toml b/mise.toml new file mode 100644 index 000000000..9a822ee3b --- /dev/null +++ b/mise.toml @@ -0,0 +1,44 @@ +[tools] +node = "24.12.0" + +[hooks] # requires experimental=true +postinstall = [ + "npx corepack enable", +] + +[tasks.yarn] +run = "yarn install --immutable" + +[tasks.build] +depends = "yarn" +run = "yarn build" + +[tasks.typedoc] +depends = "build" +run = "yarn typedoc" + +[tasks."checks:lint"] +depends = "yarn" +run = "yarn lint --max-warnings=0" + +[tasks."checks:barrel"] +description = "Check if barrel files are up-to-date" +depends = "yarn" +run = [ + "yarn ctix", + '[ -z "$(git status --porcelain)" ]', +] + +[tasks."checks:unit"] +depends = "yarn" +run = "yarn test --coverage" + +[tasks."checks:integration"] +depends = "yarn" +run = "yarn integration --coverage" + +[tasks.ci] +run = { task = "checks:*" } + +[settings] +experimental = true diff --git a/package.json b/package.json index 2583892f3..7aa429834 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,5 @@ "resolutions": { "collect-v8-coverage": "^1.0.3" }, - "volta": { - "node": "24.12.0" - }, - "packageManager": "yarn@4.12.0" + "packageManager": "yarn@4.12.0+sha512.f45ab632439a67f8bc759bf32ead036a1f413287b9042726b7cc4818b7b49e14e9423ba49b18f9e06ea4941c1ad062385b1d8760a8d5091a1a31e5f6219afca8" }