mirror of
https://github.com/unraid/api.git
synced 2026-01-04 07:29:48 -06:00
72 lines
1.5 KiB
YAML
72 lines
1.5 KiB
YAML
name: Test Libvirt
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "libvirt/**"
|
|
pull_request:
|
|
paths:
|
|
- "libvirt/**"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: ./libvirt
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13.7"
|
|
|
|
- name: Cache APT Packages
|
|
uses: awalsh128/cache-apt-pkgs-action@v1.5.3
|
|
with:
|
|
packages: libvirt-dev
|
|
version: 1.0
|
|
|
|
- name: Set Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.15.1
|
|
run_install: false
|
|
|
|
- name: Get pnpm store directory
|
|
id: pnpm-cache
|
|
shell: bash
|
|
run: |
|
|
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
|
|
- uses: actions/cache@v4
|
|
name: Setup pnpm cache
|
|
with:
|
|
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('libvirt/package.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- name: pnpm install
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build
|
|
run: pnpm run build
|
|
|
|
- name: test
|
|
run: pnpm run test
|