chore(deps): update patch/minor dependencies #13722
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
name: tests | |
on: | |
push: | |
branches: [ master, renovate/** ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
name: Build | |
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Workflow Action | |
uses: styfle/cancel-workflow-action@0.12.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout Source code | |
uses: actions/checkout@v4 | |
- name: Use Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Enable corepack | |
run: | | |
corepack enable | |
corepack prepare yarn@stable --activate | |
# Yarn dependencies cannot be cached until yarn is installed | |
# WORKAROUND: https://github.com/actions/setup-node/issues/531 | |
- name: Extract cached dependencies | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
- name: Install | |
run: yarn | |
- name: Test TS | |
run: yarn tsc-check-tests | |
- name: Build | |
run: yarn build | |
docs: | |
name: Docs build | |
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source code | |
uses: actions/checkout@v4 | |
- name: Use Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Enable corepack | |
run: | | |
corepack enable | |
corepack prepare yarn@stable --activate | |
# Yarn dependencies cannot be cached until yarn is installed | |
# WORKAROUND: https://github.com/actions/setup-node/issues/531 | |
- name: Extract cached dependencies | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
- name: Install | |
run: yarn | |
- name: Check spelling (next docs) | |
uses: crate-ci/typos@master | |
with: | |
files: docs/docs | |
- name: Check spelling (versioned docs) | |
uses: crate-ci/typos@master | |
with: | |
files: docs/versioned_docs | |
- name: Build & deploy docs | |
run: | | |
cd docs | |
yarn | |
export MIKRO_ORM_DOCS_TESTING=1 | |
yarn build | |
lint: | |
name: Lint | |
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source code | |
uses: actions/checkout@v4 | |
- name: Use Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Enable corepack | |
run: | | |
corepack enable | |
corepack prepare yarn@stable --activate | |
# Yarn dependencies cannot be cached until yarn is installed | |
# WORKAROUND: https://github.com/actions/setup-node/issues/531 | |
- name: Extract cached dependencies | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
- name: Install | |
run: yarn | |
- name: Lint | |
run: yarn lint | |
test: | |
name: Tests | |
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [ 18, 20, 22 ] | |
steps: | |
- name: Checkout Source code | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Enable corepack | |
run: | | |
corepack enable | |
corepack prepare yarn@stable --activate | |
# Yarn dependencies cannot be cached until yarn is installed | |
# WORKAROUND: https://github.com/actions/setup-node/issues/531 | |
- name: Extract cached dependencies | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
- name: Install | |
run: yarn | |
- name: Init docker | |
run: | | |
docker compose -f docker-compose.ci.yml up -d | |
- name: Set CC Required env vars | |
run: export GIT_BRANCH=$GITHUB_HEAD_REF && export GIT_COMMIT_SHA=$(git rev-parse origin/$GITHUB_HEAD_REF) | |
- name: Get number of CPU cores | |
id: cpu-cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
- name: Test | |
if: matrix.node-version < 22 | |
run: | | |
yarn test --max-workers ${{ steps.cpu-cores.outputs.count }} | |
git status && git diff | |
env: | |
RETRY_TESTS: 1 | |
- name: Coverage | |
if: matrix.node-version == 22 | |
run: | | |
yarn coverage --max-workers ${{ steps.cpu-cores.outputs.count }} | |
git status && git diff | |
env: | |
RETRY_TESTS: 1 | |
- name: Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Teardown docker | |
run: docker compose down | |
publish: | |
name: Publish | |
if: github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, '[skip ci]') | |
runs-on: ubuntu-latest | |
needs: [ test, build, lint ] | |
steps: | |
- name: Checkout Source code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # we need to pull everything to have correct dev version suffix | |
- name: Use Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Enable corepack | |
run: | | |
corepack enable | |
corepack prepare yarn@stable --activate | |
# Yarn dependencies cannot be cached until yarn is installed | |
# WORKAROUND: https://github.com/actions/setup-node/issues/531 | |
- name: Extract cached dependencies | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
- name: Install | |
run: yarn | |
- name: Build | |
run: yarn build | |
- name: Release dev version for testing | |
run: | | |
git config --global user.name 'MikroORM Release Bot' | |
git config --global user.email 'noreply@mikro-orm.io' | |
yarn lerna run copy -- -- --canary | |
git commit -am 'chore: bump canary versions [skip ci]' | |
echo "access=public" >> .npmrc | |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc | |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
yarn publish:next --yes --no-verify-access | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |