Skip to content

UI/update

UI/update #646

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint-build-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [20.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- name: Install
run: pnpm install
- name: Lint
run: pnpm lint
- name: Build
run: pnpm build
db-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18x]
os: [ubuntu-latest]
env:
DATABASE_URL: mysql://test:password@localhost:3306/poster_craft_test
SECRET: sjldk92#sd903mnc./xklsjdf9sdfj
REDIS_URL: redis://127.0.0.1:6379
services:
mysql:
image: mysql:9.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: test
MYSQL_PASSWORD: password
MYSQL_DATABASE: poster_craft_test
ports:
- 3306:3306
redis:
image: redis:7.4.0
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.12.0"
- name: Setup pnpm
run: corepack enable
- name: Install dependencies
run: pnpm install
- name: Run database initialization command
run: pnpm db:init:test:ci
- name: Run build schema
run: pnpm schema:build
lighthouse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v12
with:
urls: |
https://poster-craft.leostar.top/
https://poster-craft.leostar.top/auth/login
https://poster-craft.leostar.top/auth/register
budgetPath: ./.github/budget.json # test performance budgets
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
# test:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# node-version: [18.x, 20.x]
# os: [ubuntu-latest]
# fail-fast: false
# steps:
# - uses: actions/checkout@v4
# - uses: pnpm/action-setup@v3
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# registry-url: https://registry.npmjs.org/
# cache: pnpm
# - run: pnpm install
# - run: pnpm test