Run vitest without coverage by default (pnpm test) and add pnpm test:coverage which enforces the coverage thresholds. CI keeps using the coverage run so thresholds are still enforced on every push.
35 lines
1.0 KiB
YAML
35 lines
1.0 KiB
YAML
name: Publish portable container
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: ${{ gitea.repository }}
|
|
token: ${{ gitea.token }}
|
|
- name: Install and verify
|
|
run: |
|
|
node scripts/check-node-toolchain.mjs
|
|
pnpm install --frozen-lockfile
|
|
pnpm typecheck
|
|
pnpm biome:lint
|
|
pnpm test:coverage
|
|
env:
|
|
SKIP_ENV_VALIDATION: 1
|
|
NODE_ENV: test
|
|
DATABASE_URL: mysql://test:[email protected]:9/test
|
|
AUTH_SECRET: container-test-secret-at-least-32-characters
|
|
- name: Build, verify portability and publish
|
|
shell: bash
|
|
env:
|
|
REGISTRY_SERVER: ${{ gitea.server_url }}
|
|
REGISTRY_REPOSITORY: ${{ gitea.repository }}
|
|
REGISTRY_USER: ${{ secrets.CONTAINER_REGISTRY_USER }}
|
|
REGISTRY_TOKEN: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
|
|
run: bash scripts/publish-container.sh
|