mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-22 20:51:58 +00:00
Set yaml to 2 tab width and ran format
This commit is contained in:
124
.github/workflows/tests.yml
vendored
124
.github/workflows/tests.yml
vendored
@@ -9,78 +9,78 @@
|
|||||||
name: Tests
|
name: Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
reason:
|
reason:
|
||||||
description: "Reason"
|
description: "Reason"
|
||||||
required: false
|
required: false
|
||||||
default: "Manual trigger"
|
default: "Manual trigger"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-strategy:
|
create-strategy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.requirements.outputs.matrix }}
|
matrix: ${{ steps.requirements.outputs.matrix }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: requirements
|
- name: requirements
|
||||||
id: requirements
|
id: requirements
|
||||||
run: |
|
run: |
|
||||||
# Define a simple matrix with your Python version
|
# Define a simple matrix with your Python version
|
||||||
# Since we're using pyproject.toml with Python 3.12 requirement
|
# Since we're using pyproject.toml with Python 3.12 requirement
|
||||||
echo "matrix={\"include\": [{\"python-version\": \"3.12\"}]}" >> $GITHUB_OUTPUT
|
echo "matrix={\"include\": [{\"python-version\": \"3.12\"}]}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Print the matrix for debugging
|
# Print the matrix for debugging
|
||||||
echo "-------------------"
|
echo "-------------------"
|
||||||
echo "Matrix: {\"include\": [{\"python-version\": \"3.12\"}]}"
|
echo "Matrix: {\"include\": [{\"python-version\": \"3.12\"}]}"
|
||||||
echo "-------------------"
|
echo "-------------------"
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
needs: create-strategy
|
needs: create-strategy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Test (Python ${{matrix.python-version}})
|
name: Test (Python ${{matrix.python-version}})
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.create-strategy.outputs.matrix) }}
|
matrix: ${{ fromJson(needs.create-strategy.outputs.matrix) }}
|
||||||
|
|
||||||
# Simplified environment without service variables
|
# Simplified environment without service variables
|
||||||
env:
|
env:
|
||||||
PYTHON_VERSION: ${{ matrix.python-version }}
|
PYTHON_VERSION: ${{ matrix.python-version }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up uv
|
- name: Set up uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v6
|
||||||
with:
|
with:
|
||||||
python-version: "${{ matrix.python-version }}"
|
python-version: "${{ matrix.python-version }}"
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-dependency-glob: |
|
cache-dependency-glob: |
|
||||||
pyproject.toml
|
pyproject.toml
|
||||||
cache-suffix: ${{ matrix.python-version }}
|
cache-suffix: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Show configuration
|
- name: Show configuration
|
||||||
run: |
|
run: |
|
||||||
uv --version
|
uv --version
|
||||||
uv run python --version
|
uv run python --version
|
||||||
docker --version
|
docker --version
|
||||||
docker ps
|
docker ps
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
uv sync --group tests
|
uv sync --group tests
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
uv run test
|
uv run test
|
||||||
|
|||||||
@@ -1,45 +1,45 @@
|
|||||||
repos:
|
repos:
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-version-increment
|
- id: check-version-increment
|
||||||
name: Check Version Increment
|
name: Check Version Increment
|
||||||
entry: python scripts/hooks/pre-push/check_version_increment.py
|
entry: python scripts/hooks/pre-push/check_version_increment.py
|
||||||
language: system
|
language: system
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
stages: [pre-push]
|
stages: [pre-push]
|
||||||
|
|
||||||
- id: tests
|
- id: tests
|
||||||
name: Run Python Tests
|
name: Run Python Tests
|
||||||
entry: uv run test
|
entry: uv run test
|
||||||
language: system
|
language: system
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
stages: [pre-push]
|
stages: [pre-push]
|
||||||
|
|
||||||
- id: prettier-with-jinja
|
- id: prettier-with-jinja
|
||||||
name: Prettier (with Jinja support)
|
name: Prettier (with Jinja support)
|
||||||
entry: bun run prettier -c
|
entry: bun run prettier -c
|
||||||
language: system
|
language: system
|
||||||
types_or:
|
types_or:
|
||||||
[javascript, jsx, ts, tsx, css, scss, sass, less, yaml, json, markdown, html, jinja]
|
[javascript, jsx, ts, tsx, css, scss, sass, less, yaml, json, markdown, html, jinja]
|
||||||
stages: [pre-push]
|
stages: [pre-push]
|
||||||
|
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.11.9
|
rev: v0.11.9
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
stages: [pre-push]
|
stages: [pre-push]
|
||||||
- id: ruff-format
|
- id: ruff-format
|
||||||
stages: [pre-push]
|
stages: [pre-push]
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-eslint
|
- repo: https://github.com/pre-commit/mirrors-eslint
|
||||||
rev: v9.26.0
|
rev: v9.26.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: eslint
|
- id: eslint
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
- eslint@latest
|
- eslint@latest
|
||||||
- eslint/js
|
- eslint/js
|
||||||
- eslint/json
|
- eslint/json
|
||||||
- eslint-plugin-react
|
- eslint-plugin-react
|
||||||
|
|
||||||
files: \.(js|ts|jsx|tsx)$
|
files: \.(js|ts|jsx|tsx)$
|
||||||
stages: [pre-push]
|
stages: [pre-push]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
|
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
|
||||||
inputs:
|
inputs:
|
||||||
nixpkgs:
|
nixpkgs:
|
||||||
url: github:cachix/devenv-nixpkgs/rolling
|
url: github:cachix/devenv-nixpkgs/rolling
|
||||||
|
|||||||
@@ -11,6 +11,18 @@ const config = {
|
|||||||
parser: "jinja-template",
|
parser: "jinja-template",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
files: "*.yaml",
|
||||||
|
options: {
|
||||||
|
tabWidth: 2,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "*.yml",
|
||||||
|
options: {
|
||||||
|
tabWidth: 2,
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user