Skip to content

Merge pull request #323 from taiyme/merge-upstream #14

Merge pull request #323 from taiyme/merge-upstream

Merge pull request #323 from taiyme/merge-upstream #14

Workflow file for this run

name: Test (backend)
on:
push:
branches:
- taiyme
- release
paths:
- .github/workflows/test-backend.yaml
- .github/misskey/test.yml
- packages/backend/**/*
- packages/misskey-js/**/*
pull_request_target:
branches:
- taiyme
- release
paths:
- .github/misskey/test.yml
- packages/backend/**/*
- packages/misskey-js/**/*
permissions:
contents: read
jobs:
pre-checkout:
name: Pre checkout
uses: ./.github/workflows/pre-checkout.yaml
unit-testing:
name: Unit testing
runs-on: ubuntu-22.04
needs:
- pre-checkout
strategy:
fail-fast: false
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
env:
MISSKEY_CONFIG_YML: ci_config.yaml
steps:
- name: Checkout
uses: actions/[email protected]
with:
persist-credentials: false
ref: ${{ needs.pre-checkout.outputs.sha }}
fetch-depth: 1
submodules: true
- name: Enable corepack
run: |
corepack enable
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version-file: .node-version
cache: pnpm
- name: Setup FFmpeg
uses: federicocarboni/setup-ffmpeg@37062fbf7149fc5578d6c57e08aed62458b375d6 # v3.1
- name: Install dependencies
run: |
pnpm i --frozen-lockfile
- name: Copy config
run: |
cp .github/misskey/test.yml ".config/${MISSKEY_CONFIG_YML}"
- name: Build
run: |
pnpm build
- name: Test
run: |
pnpm --filter backend test
# TODO: カバレッジレポートはまた今度
e2e-testing:
name: E2E testing
runs-on: ubuntu-22.04
needs:
- pre-checkout
strategy:
fail-fast: false
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
env:
MISSKEY_CONFIG_YML: ci_config.yaml
steps:
- name: Checkout
uses: actions/[email protected]
with:
persist-credentials: false
ref: ${{ needs.pre-checkout.outputs.sha }}
fetch-depth: 1
submodules: true
- name: Enable corepack
run: |
corepack enable
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version-file: .node-version
cache: pnpm
- name: Setup FFmpeg
uses: federicocarboni/setup-ffmpeg@37062fbf7149fc5578d6c57e08aed62458b375d6 # v3.1
- name: Install dependencies
run: |
pnpm i --frozen-lockfile
- name: Copy config
run: |
cp .github/misskey/test.yml ".config/${MISSKEY_CONFIG_YML}"
- name: Build
run: |
pnpm build
- name: Test
run: |
pnpm --filter backend test:e2e
# TODO: カバレッジレポートはまた今度