Skip to content

[pull] develop from runtipi:develop #494

[pull] develop from runtipi:develop

[pull] develop from runtipi:develop #494

Workflow file for this run

name: Tipi CI
on:
pull_request:
env:
ROOT_FOLDER: /runtipi
JWT_SECRET: "secret"
ROOT_FOLDER_HOST: /runtipi
APPS_REPO_ID: repo-id
INTERNAL_IP: localhost
REDIS_HOST: redis
REDIS_PASSWORD: redis
APPS_REPO_URL: https://repo.github.com/
DOMAIN: localhost
LOCAL_DOMAIN: tipi.lan
TIPI_VERSION: 0.0.1
POSTGRES_HOST: localhost
POSTGRES_DBNAME: postgres
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 5433
jobs:
tests:
runs-on: ubuntu-latest
# services:
# postgres:
# image: postgres:14
# env:
# POSTGRES_PASSWORD: postgres
# ports:
# - 5433:5432
# # set health checks to wait until postgres has started
# options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 9.12.2
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Run biome tests
run: pnpm lint:ci
# - name: Get number of CPU cores
# id: cpu-cores
# uses: SimenB/github-actions-cpu-cores@v2
#
# - name: Run tests
# run: pnpm run test --max-workers ${{ steps.cpu-cores.outputs.count }}
#
# - name: Run packages tests
# run: pnpm -r test
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 9.12.2
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build client
run: npm run build
- name: Run tsc
run: pnpm -r run tsc