diff --git a/.github/FUNDING.yml b/.github/FUNDING.yaml similarity index 100% rename from .github/FUNDING.yml rename to .github/FUNDING.yaml diff --git a/.github/ISSUE_TEMPLATE/01_bug-report.yml b/.github/ISSUE_TEMPLATE/01_bug-report.yaml similarity index 100% rename from .github/ISSUE_TEMPLATE/01_bug-report.yml rename to .github/ISSUE_TEMPLATE/01_bug-report.yaml diff --git a/.github/ISSUE_TEMPLATE/02_feature-request.yml b/.github/ISSUE_TEMPLATE/02_feature-request.yaml similarity index 100% rename from .github/ISSUE_TEMPLATE/02_feature-request.yml rename to .github/ISSUE_TEMPLATE/02_feature-request.yaml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yaml similarity index 100% rename from .github/ISSUE_TEMPLATE/config.yml rename to .github/ISSUE_TEMPLATE/config.yaml diff --git a/.github/PULL_REQUEST_TEMPLATE/01_bug.md b/.github/PULL_REQUEST_TEMPLATE/01_bug.md deleted file mode 100644 index 9ef99b57580f..000000000000 --- a/.github/PULL_REQUEST_TEMPLATE/01_bug.md +++ /dev/null @@ -1,15 +0,0 @@ -## What - - - -## Why - - - -## Additional info (optional) - - - -## Checklist -- [ ] Test working in a local environment -- [ ] (If possible) Add tests diff --git a/.github/PULL_REQUEST_TEMPLATE/02_enhance.md b/.github/PULL_REQUEST_TEMPLATE/02_enhance.md deleted file mode 100644 index 9ef99b57580f..000000000000 --- a/.github/PULL_REQUEST_TEMPLATE/02_enhance.md +++ /dev/null @@ -1,15 +0,0 @@ -## What - - - -## Why - - - -## Additional info (optional) - - - -## Checklist -- [ ] Test working in a local environment -- [ ] (If possible) Add tests diff --git a/.github/PULL_REQUEST_TEMPLATE/03_release.md b/.github/PULL_REQUEST_TEMPLATE/03_release.md deleted file mode 100644 index 26585db3597a..000000000000 --- a/.github/PULL_REQUEST_TEMPLATE/03_release.md +++ /dev/null @@ -1,15 +0,0 @@ -## Summary -This is a release PR. - -## For reviewers -- バージョンの上げ方は適切か -- 他にこのリリースに含めなければならない変更は無いか -- 全体的な変更内容を俯瞰し問題は無いか -- レビューされていないコミットがある場合は、それが問題ないか -- 最終的な動作確認を行い問題は無いか - -などを確認し、リリースする準備が整っていると思われる場合は approve してください。 - -## Checklist -- [ ] package.jsonのバージョンが正しく更新されている -- [ ] CIが全て通っている diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index d4678ec5e042..000000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,48 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: -- package-ecosystem: github-actions - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 100 - -# Add only the root, not each workspace item -# https://github.com/dependabot/dependabot-core/issues/4993#issuecomment-1289133027 -- package-ecosystem: npm - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 - # List dependencies required to be updated together, sharing the same version numbers. - # Those who simply have the common owner (e.g. @fastify) don't need to be listed. - groups: - aws-sdk: - patterns: - - "@aws-sdk/*" - bull-board: - patterns: - - "@bull-board/*" - nestjs: - patterns: - - "@nestjs/*" - slacc: - patterns: - - "slacc-*" - storybook: - patterns: - - "storybook*" - - "@storybook/*" - swc-core: - patterns: - - "@swc/core*" - typescript-eslint: - patterns: - - "@typescript-eslint/*" - tensorflow: - patterns: - - "@tensorflow/*" diff --git a/.github/labeler.yaml b/.github/labeler.yaml new file mode 100644 index 000000000000..74cadbf92fc8 --- /dev/null +++ b/.github/labeler.yaml @@ -0,0 +1,42 @@ +packages/backend: + - any: + - changed-files: + - any-glob-to-any-file: + - packages/backend/**/* + +packages/backend:test: + - any: + - changed-files: + - any-glob-to-any-file: + - packages/backend/test/**/* + +packages/frontend: + - any: + - changed-files: + - any-glob-to-any-file: + - packages/frontend/**/* + +packages/frontend:test: + - any: + - changed-files: + - any-glob-to-any-file: + - cypress/**/* + +packages/sw: + - any: + - changed-files: + - any-glob-to-any-file: + - packages/sw/**/* + +packages/misskey-js: + - any: + - changed-files: + - any-glob-to-any-file: + - packages/misskey-js/**/* + +packages/misskey-js:test: + - any: + - changed-files: + - any-glob-to-any-file: + - packages/misskey-js/test/**/* + - packages/misskey-js/test-d/**/* diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index a77f73706b9e..000000000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,34 +0,0 @@ -'packages/backend': -- any: - - changed-files: - - any-glob-to-any-file: ['packages/backend/**/*'] - -'packages/backend:test': -- any: - - changed-files: - - any-glob-to-any-file: ['packages/backend/test/**/*'] - -'packages/frontend': -- any: - - changed-files: - - any-glob-to-any-file: ['packages/frontend/**/*'] - -'packages/frontend:test': -- any: - - changed-files: - - any-glob-to-any-file: ['cypress/**/*'] - -'packages/sw': -- any: - - changed-files: - - any-glob-to-any-file: ['packages/sw/**/*'] - -'packages/misskey-js': -- any: - - changed-files: - - any-glob-to-any-file: ['packages/misskey-js/**/*'] - -'packages/misskey-js:test': -- any: - - changed-files: - - any-glob-to-any-file: ['packages/misskey-js/test/**/*', 'packages/misskey-js/test-d/**/*'] diff --git a/.github/misskey/test.yml b/.github/misskey/test.yml deleted file mode 100644 index 7a4aa4ae6cce..000000000000 --- a/.github/misskey/test.yml +++ /dev/null @@ -1,15 +0,0 @@ -url: 'http://misskey.local' - -# ローカルでテストするときにポートを被らないようにするためデフォルトのものとは変える(以下同じ) -port: 61812 - -db: - host: 127.0.0.1 - port: 54312 - db: test-misskey - user: postgres - pass: '' -redis: - host: 127.0.0.1 - port: 56312 -id: aidx diff --git a/.github/workflows/api-misskey-js.yml b/.github/workflows/api-misskey-js.yml deleted file mode 100644 index e7db18316cb3..000000000000 --- a/.github/workflows/api-misskey-js.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: API report (misskey.js) - -on: - push: - paths: - - packages/misskey-js/** - - .github/workflows/api-misskey-js.yml - pull_request: - paths: - - packages/misskey-js/** - - .github/workflows/api-misskey-js.yml -jobs: - report: - - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4.1.1 - - - run: corepack enable - - - name: Setup Node.js - uses: actions/setup-node@v4.0.3 - with: - node-version-file: '.node-version' - cache: 'pnpm' - - - name: Install dependencies - run: pnpm i --frozen-lockfile - - - name: Build - run: pnpm --filter misskey-js build - - - name: Check files - run: ls packages/misskey-js/built - - - name: API report - run: pnpm --filter misskey-js api-prod - - - name: Show report - if: always() - run: cat packages/misskey-js/temp/misskey-js.api.md diff --git a/.github/workflows/check-misskey-js-version.yml b/.github/workflows/check-misskey-js-version.yml deleted file mode 100644 index 3b700e8343f4..000000000000 --- a/.github/workflows/check-misskey-js-version.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Check Misskey JS version - -on: - push: - branches: - - taiyme - paths: - - packages/misskey-js/package.json - - package.json - - .github/workflows/check-misskey-js-version.yml - pull_request: - branches: - - taiyme - paths: - - packages/misskey-js/package.json - - package.json - - .github/workflows/check-misskey-js-version.yml -jobs: - check-version: - # ルートの package.json と packages/misskey-js/package.json のバージョンが一致しているかを確認する - name: Check version - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4.1.1 - - name: Check version - run: | - if [ "$(jq -r '.version' package.json)" != "$(jq -r '.version' packages/misskey-js/package.json)" ]; then - echo "Version mismatch!" - exit 1 - fi diff --git a/.github/workflows/check-spdx-license-id.yml b/.github/workflows/check-spdx-license-id.yaml similarity index 81% rename from .github/workflows/check-spdx-license-id.yml rename to .github/workflows/check-spdx-license-id.yaml index 67b085e27c61..46cba80938dc 100644 --- a/.github/workflows/check-spdx-license-id.yml +++ b/.github/workflows/check-spdx-license-id.yaml @@ -4,15 +4,28 @@ on: push: branches: - taiyme + paths: + - .github/workflows/check-spdx-license-id.yaml + - cypress/e2e/**/* + - packages/**/* + - scripts/**/* pull_request: + paths: + - .github/workflows/check-spdx-license-id.yaml + - cypress/e2e/**/* + - packages/**/* + - scripts/**/* + workflow_dispatch: jobs: - check-spdx-license-id: - runs-on: ubuntu-latest + check_spdx_license_id: + name: Check SPDX-License-Identifier + runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v4.1.1 - - name: Check + uses: actions/checkout@v4 + + - name: Check SPDX-License-Identifier run: | counter=0 diff --git a/.github/workflows/check_copyright_year.yml b/.github/workflows/check_copyright_year.yml deleted file mode 100644 index 47075142e51a..000000000000 --- a/.github/workflows/check_copyright_year.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Check copyright year - -on: - push: - branches: - - taiyme - -jobs: - check_copyright_year: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4.1.1 - - run: | - if [ "$(grep Copyright COPYING | sed -e 's/.*2014-\([0-9]*\) .*/\1/g')" -ne "$(date +%Y)" ]; then - echo "Please change copyright year!" - exit 1 - fi diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-publish.yaml similarity index 96% rename from .github/workflows/docker-build.yml rename to .github/workflows/docker-publish.yaml index 07b06d5f0f46..3ef3b75322b2 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-publish.yaml @@ -1,4 +1,4 @@ -name: Build docker image +name: Publish Docker image on: workflow_call: @@ -18,8 +18,8 @@ permissions: jobs: # see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners build: - name: build_amd64 - runs-on: ubuntu-latest + name: Build + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -80,7 +80,8 @@ jobs: retention-days: 1 merge: - runs-on: ubuntu-latest + name: Merge + runs-on: ubuntu-22.04 needs: - build steps: diff --git a/.github/workflows/dockle.yml b/.github/workflows/dockle.yml deleted file mode 100644 index 508b80d4dfcb..000000000000 --- a/.github/workflows/dockle.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Dockle - -on: - push: - branches: - - taiyme - pull_request: - -jobs: - dockle: - runs-on: ubuntu-latest - env: - DOCKER_CONTENT_TRUST: 1 - DOCKLE_VERSION: 0.4.14 - steps: - - uses: actions/checkout@v4.1.1 - - name: Download and install dockle v${{ env.DOCKLE_VERSION }} - run: | - curl -L -o dockle.deb "https://github.com/goodwithtech/dockle/releases/download/v${DOCKLE_VERSION}/dockle_${DOCKLE_VERSION}_Linux-64bit.deb" - sudo dpkg -i dockle.deb - - run: | - cp .config/docker_example.env .config/docker.env - cp ./compose_example.yml ./compose.yml - - run: | - docker compose up -d web - docker tag "$(docker compose images web | awk 'OFS=":" {print $4}' | tail -n +2)" misskey-web:latest - - run: | - cmd="dockle --exit-code 1 misskey-web:latest ${image_name}" - echo "> ${cmd}" - eval "${cmd}" diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml new file mode 100644 index 000000000000..8a2186f95e34 --- /dev/null +++ b/.github/workflows/labeler.yaml @@ -0,0 +1,18 @@ +name: Pull Request Labeler + +on: + pull_request_target: + +jobs: + triage: + name: Triage + runs-on: ubuntu-22.04 + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/labeler@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/labeler.yaml + sync-labels: true diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index 88e2aceaed6b..000000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: "Pull Request Labeler" -on: - pull_request_target: - branches-ignore: - - 'l10n_develop' - -jobs: - triage: - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v5 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/lint-locales.yaml b/.github/workflows/lint-locales.yaml new file mode 100644 index 000000000000..faf2d9c828a1 --- /dev/null +++ b/.github/workflows/lint-locales.yaml @@ -0,0 +1,41 @@ +name: Lint (locales) + +on: + push: + branches: + - taiyme + paths: + - .github/workflows/lint-locales.yaml + - locales/**/* + pull_request: + paths: + - .github/workflows/lint-locales.yaml + - locales/**/* + workflow_dispatch: + +jobs: + lint_locales: + name: Lint locales + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Enable corepack + run: | + corepack enable + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .node-version + cache: pnpm + + - name: Install dependencies + run: | + pnpm i --frozen-lockfile + + - name: Check Verify + working-directory: locales + run: | + node verify.js diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 000000000000..bad785a1fc7c --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,139 @@ +name: Lint + +on: + push: + branches: + - taiyme + paths: + - .github/workflows/lint.yaml + - packages/backend/**/* + - packages/frontend/**/* + - packages/sw/**/* + - packages/misskey-js/**/* + - packages/shared/eslint.config.js + pull_request: + paths: + - .github/workflows/lint.yaml + - packages/backend/**/* + - packages/frontend/**/* + - packages/sw/**/* + - packages/misskey-js/**/* + - packages/shared/eslint.config.js + workflow_dispatch: + +jobs: + run_pnpm_install: + name: Run pnpm install + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + + - name: Enable corepack + run: | + corepack enable + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .node-version + cache: pnpm + + - name: Install dependencies + run: | + pnpm i --frozen-lockfile + + lint: + name: Lint + runs-on: ubuntu-22.04 + needs: + - run_pnpm_install + env: + eslint-cache-version: v1 + strategy: + matrix: + workspace: + - backend + - frontend + - sw + - misskey-js + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + + - name: Enable corepack + run: | + corepack enable + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .node-version + cache: pnpm + + - name: Install dependencies + run: | + pnpm i --frozen-lockfile + + - name: Restore eslint cache + uses: actions/cache@v4 + with: + path: node_modules/.cache/eslint + key: eslint-${{ env.eslint-cache-version }}-${{ hashFiles('/pnpm-lock.yaml') }}-${{ github.ref_name }}-${{ github.sha }} + restore-keys: | + eslint-${{ env.eslint-cache-version }}-${{ hashFiles('/pnpm-lock.yaml') }}- + + - name: Run eslint + run: | + pnpm --filter ${{ matrix.workspace }} run eslint --cache --cache-location node_modules/.cache/eslint --cache-strategy content + + typecheck: + name: Typecheck + runs-on: ubuntu-22.04 + needs: + - run_pnpm_install + strategy: + matrix: + workspace: + - backend + - misskey-js + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + + - name: Enable corepack + run: | + corepack enable + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .node-version + cache: pnpm + + - name: Install dependencies + run: | + pnpm i --frozen-lockfile + + - name: Build (misskey-js) + if: matrix.workspace == 'backend' + run: | + pnpm --filter misskey-js run build + + - name: Build (misskey-reversi) + if: matrix.workspace == 'backend' + run: | + pnpm --filter misskey-reversi run build + + - name: Run typecheck + run: | + pnpm --filter ${{ matrix.workspace }} run typecheck diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index ad188f984529..000000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,97 +0,0 @@ -name: Lint - -on: - push: - branches: - - taiyme - paths: - - packages/backend/** - - packages/frontend/** - - packages/sw/** - - packages/misskey-js/** - - packages/shared/eslint.config.js - - .github/workflows/lint.yml - pull_request: - paths: - - packages/backend/** - - packages/frontend/** - - packages/sw/** - - packages/misskey-js/** - - packages/shared/eslint.config.js - - .github/workflows/lint.yml -jobs: - pnpm_install: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - submodules: true - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4.0.3 - with: - node-version-file: '.node-version' - cache: 'pnpm' - - run: corepack enable - - run: pnpm i --frozen-lockfile - - lint: - needs: [pnpm_install] - runs-on: ubuntu-latest - continue-on-error: true - env: - eslint-cache-version: v1 - strategy: - matrix: - workspace: - - backend - - frontend - - sw - - misskey-js - steps: - - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - submodules: true - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4.0.3 - with: - node-version-file: '.node-version' - cache: 'pnpm' - - run: corepack enable - - run: pnpm i --frozen-lockfile - - name: Restore eslint cache - uses: actions/cache@v4.0.2 - with: - path: node_modules/.cache/eslint - key: eslint-${{ env.eslint-cache-version }}-${{ hashFiles('/pnpm-lock.yaml') }}-${{ github.ref_name }}-${{ github.sha }} - restore-keys: | - eslint-${{ env.eslint-cache-version }}-${{ hashFiles('/pnpm-lock.yaml') }}- - - run: pnpm --filter ${{ matrix.workspace }} run eslint --cache --cache-location node_modules/.cache/eslint --cache-strategy content - - typecheck: - needs: [pnpm_install] - runs-on: ubuntu-latest - continue-on-error: true - strategy: - matrix: - workspace: - - backend - - misskey-js - steps: - - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - submodules: true - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4.0.3 - with: - node-version-file: '.node-version' - cache: 'pnpm' - - run: corepack enable - - run: pnpm i --frozen-lockfile - - run: pnpm --filter misskey-js run build - if: ${{ matrix.workspace == 'backend' }} - - run: pnpm --filter misskey-reversi run build - if: ${{ matrix.workspace == 'backend' }} - - run: pnpm --filter ${{ matrix.workspace }} run typecheck diff --git a/.github/workflows/locale.yml b/.github/workflows/locale.yml deleted file mode 100644 index 95251bfe31e0..000000000000 --- a/.github/workflows/locale.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Lint - -on: - push: - paths: - - locales/** - - .github/workflows/locale.yml - pull_request: - paths: - - locales/** - - .github/workflows/locale.yml -jobs: - locale_verify: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - submodules: true - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4.0.3 - with: - node-version-file: '.node-version' - cache: 'pnpm' - - run: corepack enable - - run: pnpm i --frozen-lockfile - - run: cd locales && node verify.js diff --git a/.github/workflows/release.yml b/.github/workflows/release.yaml similarity index 95% rename from .github/workflows/release.yml rename to .github/workflows/release.yaml index 46aebee6d5ed..a079d95a4a40 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yaml @@ -17,7 +17,7 @@ env: jobs: check_context: name: Check context - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Check actor if: github.actor != github.repository_owner @@ -52,7 +52,7 @@ jobs: parse_new_version: name: Parse new version - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - check_context outputs: @@ -81,7 +81,7 @@ jobs: create_pr: name: Create PR - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - parse_new_version outputs: @@ -106,7 +106,7 @@ jobs: bump_version_update: name: Bump version (update) - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - parse_new_version steps: @@ -144,7 +144,7 @@ jobs: bump_version_upload: name: Bump version (upload) - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - parse_new_version - create_pr @@ -170,12 +170,12 @@ jobs: git tag "${{ needs.parse_new_version.outputs.NEW_VERSION }}" git push origin HEAD --follow-tags - build_docker_image: - name: Build Docker image + publish_docker_image: + name: Publish Docker image needs: - parse_new_version - bump_version_upload - uses: ./.github/workflows/docker-build.yml + uses: ./.github/workflows/docker-publish.yaml with: tags: | ${{ needs.parse_new_version.outputs.NEW_VERSION }} @@ -183,11 +183,11 @@ jobs: merge_pr: name: Merge PR - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - parse_new_version - create_pr - - build_docker_image + - publish_docker_image env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} permissions: @@ -201,7 +201,7 @@ jobs: release: name: Release - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: - parse_new_version - merge_pr diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml deleted file mode 100644 index d1b7b44ad4cb..000000000000 --- a/.github/workflows/test-backend.yml +++ /dev/null @@ -1,115 +0,0 @@ -name: Test (backend) - -on: - push: - branches: - - taiyme - paths: - - packages/backend/** - # for permissions - - packages/misskey-js/** - - .github/workflows/test-backend.yml - pull_request: - paths: - - packages/backend/** - # for permissions - - packages/misskey-js/** - - .github/workflows/test-backend.yml -jobs: - unit: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: - - 20.16.0 - - services: - postgres: - image: postgres:15 - ports: - - 54312:5432 - env: - POSTGRES_DB: test-misskey - POSTGRES_HOST_AUTH_METHOD: trust - redis: - image: redis:7 - ports: - - 56312:6379 - - steps: - - uses: actions/checkout@v4.1.1 - with: - submodules: true - - name: Install pnpm - uses: pnpm/action-setup@v4 - - name: Install FFmpeg - uses: FedericoCarboni/setup-ffmpeg@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.3 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - run: corepack enable - - run: pnpm i --frozen-lockfile - - name: Check pnpm-lock.yaml - run: git diff --exit-code pnpm-lock.yaml - - name: Copy Configure - run: cp .github/misskey/test.yml .config - - name: Build - run: pnpm build - - name: Test - run: pnpm --filter backend test-and-coverage - - name: Upload to Codecov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./packages/backend/coverage/coverage-final.json - - e2e: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: - - 20.16.0 - - services: - postgres: - image: postgres:15 - ports: - - 54312:5432 - env: - POSTGRES_DB: test-misskey - POSTGRES_HOST_AUTH_METHOD: trust - redis: - image: redis:7 - ports: - - 56312:6379 - - steps: - - uses: actions/checkout@v4.1.1 - with: - submodules: true - - name: Install pnpm - uses: pnpm/action-setup@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.3 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - run: corepack enable - - run: pnpm i --frozen-lockfile - - name: Check pnpm-lock.yaml - run: git diff --exit-code pnpm-lock.yaml - - name: Copy Configure - run: cp .github/misskey/test.yml .config - - name: Build - run: pnpm build - - name: Test - run: pnpm --filter backend test-and-coverage:e2e - - name: Upload to Codecov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./packages/backend/coverage/coverage-final.json diff --git a/.github/workflows/test-frontend.yml b/.github/workflows/test-frontend.yml deleted file mode 100644 index 4efb76f792e2..000000000000 --- a/.github/workflows/test-frontend.yml +++ /dev/null @@ -1,129 +0,0 @@ -name: Test (frontend) - -on: - push: - branches: - - taiyme - paths: - - packages/frontend/** - # for permissions - - packages/misskey-js/** - # for e2e - - packages/backend/** - - .github/workflows/test-frontend.yml - pull_request: - paths: - - packages/frontend/** - # for permissions - - packages/misskey-js/** - # for e2e - - packages/backend/** - - .github/workflows/test-frontend.yml -jobs: - vitest: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: - - 20.16.0 - - steps: - - uses: actions/checkout@v4.1.1 - with: - submodules: true - - name: Install pnpm - uses: pnpm/action-setup@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.3 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - run: corepack enable - - run: pnpm i --frozen-lockfile - - name: Check pnpm-lock.yaml - run: git diff --exit-code pnpm-lock.yaml - - name: Copy Configure - run: cp .github/misskey/test.yml .config - - name: Build - run: pnpm build - - name: Test - run: pnpm --filter frontend test-and-coverage - - name: Upload Coverage - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./packages/frontend/coverage/coverage-final.json - - e2e: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - node-version: - - 20.16.0 - browser: [chrome] - - services: - postgres: - image: postgres:15 - ports: - - 54312:5432 - env: - POSTGRES_DB: test-misskey - POSTGRES_HOST_AUTH_METHOD: trust - redis: - image: redis:7 - ports: - - 56312:6379 - - steps: - - uses: actions/checkout@v4.1.1 - with: - submodules: true - # https://github.com/cypress-io/cypress-docker-images/issues/150 - #- name: Install mplayer for FireFox - # run: sudo apt install mplayer -y - # if: ${{ matrix.browser == 'firefox' }} - #- uses: browser-actions/setup-firefox@latest - # if: ${{ matrix.browser == 'firefox' }} - - name: Install pnpm - uses: pnpm/action-setup@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.3 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - run: corepack enable - - run: pnpm i --frozen-lockfile - - name: Copy Configure - run: cp .github/misskey/test.yml .config - - name: Build - run: pnpm build - # https://github.com/cypress-io/cypress/issues/4351#issuecomment-559489091 - - name: ALSA Env - run: echo -e 'pcm.!default {\n type hw\n card 0\n}\n\nctl.!default {\n type hw\n card 0\n}' > ~/.asoundrc - # XXX: This tries reinstalling Cypress if the binary is not cached - # Remove this when the cache issue is fixed - - name: Cypress install - run: pnpm exec cypress install - - name: Cypress run - uses: cypress-io/github-action@v6 - timeout-minutes: 15 - with: - install: false - start: pnpm start:test - wait-on: 'http://localhost:61812' - headed: true - browser: ${{ matrix.browser }} - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: ${{ matrix.browser }}-cypress-screenshots - path: cypress/screenshots - - uses: actions/upload-artifact@v4 - if: always() - with: - name: ${{ matrix.browser }}-cypress-videos - path: cypress/videos diff --git a/.github/workflows/test-misskey-js.yml b/.github/workflows/test-misskey-js.yml deleted file mode 100644 index 4512f705ac1e..000000000000 --- a/.github/workflows/test-misskey-js.yml +++ /dev/null @@ -1,60 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Test (misskey.js) - -on: - push: - branches: - - taiyme - paths: - - packages/misskey-js/** - - .github/workflows/test-misskey-js.yml - pull_request: - branches: - - taiyme - paths: - - packages/misskey-js/** - - .github/workflows/test-misskey-js.yml -jobs: - test: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: - - 20.16.0 - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - name: Checkout - uses: actions/checkout@v4.1.1 - - - run: corepack enable - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.3 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - - name: Install dependencies - run: pnpm i --frozen-lockfile - - - name: Check pnpm-lock.yaml - run: git diff --exit-code pnpm-lock.yaml - - - name: Build - run: pnpm --filter misskey-js build - - - name: Test - run: pnpm --filter misskey-js test - env: - CI: true - - - name: Upload Coverage - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./packages/misskey-js/coverage/coverage-final.json diff --git a/.github/workflows/test-production.yml b/.github/workflows/test-production.yml deleted file mode 100644 index be725ccd8a96..000000000000 --- a/.github/workflows/test-production.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Test (production install and build) - -on: - push: - branches: - - taiyme - pull_request: - -env: - NODE_ENV: production - -jobs: - production: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: - - 20.16.0 - - steps: - - uses: actions/checkout@v4.1.1 - with: - submodules: true - - name: Install pnpm - uses: pnpm/action-setup@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.3 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - run: corepack enable - - run: pnpm i --frozen-lockfile - - name: Check pnpm-lock.yaml - run: git diff --exit-code pnpm-lock.yaml - - name: Copy Configure - run: cp .github/misskey/test.yml .config/default.yml - - name: Build - run: pnpm build