Skip to content

chore: temporary shutdown #2864

chore: temporary shutdown

chore: temporary shutdown #2864

Workflow file for this run

name: ci
"on":
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: corepack enable
- run: make lint
- run: pnpm i
- run: pnpm lint-check
- run: pnpm tsc
- run: pnpm build
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: corepack enable
- run: pnpm i
- run: make docker/up db/reset/test db/seed-download
- run: pnpm test-coverage
- uses: actions/upload-artifact@v3
with:
name: coverage-unit
path: coverage/unit
test-e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: corepack enable
- run: pnpm i
- uses: actions/cache@v3
id: cache-playwright
with:
path: ~/.cache/ms-playwright
key: playwright-${{ hashFiles('./node_modules/@playwright/test/package.json') }}
- if: steps.cache-playwright.outputs.cache-hit != 'true'
run: npx playwright install --with-deps
- run: make docker/up db/reset/test db/seed-download
# TODO: fix coverage
# - run: pnpm test-e2e-coverage --retries=3
- run: pnpm test-e2e --retries=3
- run: rm -rf coverage/e2e-client/tmp coverage/e2e-server/tmp
- uses: actions/upload-artifact@v3
with:
name: coverage-e2e-server
path: coverage/e2e-server
- uses: actions/upload-artifact@v3
if: always()
with:
name: test-results-e2e
path: test-results
test-migrations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: corepack enable
- run: pnpm i
- run: make docker/up db/recreate
- run: pnpm knex migrate:status # initialize knex migration management tables
- run: pnpm cli dbTestMigrations --unitTest
- run: pnpm cli dbTestMigrations --reversibilityTest
- run: make db/reset/dev
- name: install skeema
run: |
curl -LO https://github.com/skeema/skeema/releases/download/v1.10.0/skeema_amd64.deb
sudo apt install ./skeema_amd64.deb
- run: pnpm skeema diff
- run: pnpm skeema lint
publish-coverage-report:
runs-on: ubuntu-latest
needs:
- test
- test-e2e
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/download-artifact@v3
with:
name: coverage-unit
path: coverage/unit
# TODO
# - uses: actions/download-artifact@v3
# with:
# name: coverage-e2e-server
# path: coverage/e2e-server
- name: publish report
run: |
# run gh-pages
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
NODE_DEBUG=gh-pages npx gh-pages --branch __coverage__ --dist coverage --repo "https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
# output summary
git fetch --depth 1 origin __coverage__
report_url_base="https://htmlpreview.github.io/?https://raw.githubusercontent.com/hi-ogawa/ytsub-v3/$(git rev-parse origin/__coverage__)"
echo "## coverage report" >> $GITHUB_STEP_SUMMARY
echo "- [unit]($report_url_base/unit/index.html)" >> $GITHUB_STEP_SUMMARY
echo "- [e2e-server]($report_url_base/e2e-server/index.html)" >> $GITHUB_STEP_SUMMARY