mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-12-23 23:59:04 -05:00
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
103 lines
2.5 KiB
YAML
103 lines
2.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [development]
|
|
paths:
|
|
- frontend/**
|
|
- bazarr/**
|
|
- libs/**
|
|
- migrations/**
|
|
- bazarr.py
|
|
- requirements.txt
|
|
- dev-requirements.txt
|
|
- .github/workflows/ci.yml
|
|
pull_request:
|
|
branches: [development]
|
|
|
|
env:
|
|
ROOT_DIRECTORY: .
|
|
UI_DIRECTORY: ./frontend
|
|
SCRIPTS_DIRECTORY: .github/scripts
|
|
UI_ARTIFACT_NAME: ui
|
|
|
|
jobs:
|
|
Frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Cache node_modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: "${{ env.UI_DIRECTORY }}/node_modules"
|
|
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: ${{ runner.os }}-modules-
|
|
|
|
- name: Setup NodeJS
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version-file: "${{ env.UI_DIRECTORY }}/.nvmrc"
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
working-directory: ${{ env.UI_DIRECTORY }}
|
|
|
|
- name: Check Types
|
|
run: npm run check:ts
|
|
working-directory: ${{ env.UI_DIRECTORY }}
|
|
|
|
- name: Check Styles
|
|
run: npm run check
|
|
working-directory: ${{ env.UI_DIRECTORY }}
|
|
|
|
- name: Check Format
|
|
run: npm run check:fmt
|
|
working-directory: ${{ env.UI_DIRECTORY }}
|
|
|
|
- name: Unit Test
|
|
run: npm test
|
|
working-directory: ${{ env.UI_DIRECTORY }}
|
|
|
|
- name: Build
|
|
run: npm run build:ci
|
|
working-directory: ${{ env.UI_DIRECTORY }}
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ env.UI_ARTIFACT_NAME }}
|
|
path: "${{ env.UI_DIRECTORY }}/build"
|
|
|
|
Backend:
|
|
runs-on: ubuntu-latest
|
|
needs: Frontend
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
|
|
name: Python ${{ matrix.python-version }} backend
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install UI
|
|
uses: actions/download-artifact@v5
|
|
with:
|
|
name: ${{ env.UI_ARTIFACT_NAME }}
|
|
path: "${{ env.UI_DIRECTORY }}/build"
|
|
|
|
- name: Install Python dependencies
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Unit Tests
|
|
run: |
|
|
bash '${{ env.SCRIPTS_DIRECTORY }}/build_test.sh'
|