refactor integration.yml
This commit is contained in:
parent
a7efdd908b
commit
8f5296e8c7
8
.github/workflows/container.yml
vendored
8
.github/workflows/container.yml
vendored
@ -8,9 +8,9 @@ on:
|
|||||||
- Integration
|
- Integration
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
# TODO: Uncomment
|
# TODO: Test container.yml on merge https://github.com/searxng/searxng/pull/4699
|
||||||
# branches:
|
branches:
|
||||||
# - master
|
- master
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@ -55,7 +55,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
||||||
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
||||||
path: "./local"
|
path: "./local/"
|
||||||
|
|
||||||
- name: Setup cache container mounts
|
- name: Setup cache container mounts
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
2
.github/workflows/data-update.yml
vendored
2
.github/workflows/data-update.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
||||||
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
||||||
path: "./local"
|
path: "./local/"
|
||||||
|
|
||||||
- name: Setup venv
|
- name: Setup venv
|
||||||
run: make V=1 install
|
run: make V=1 install
|
||||||
|
131
.github/workflows/integration.yml
vendored
131
.github/workflows/integration.yml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Integration
|
name: Integration
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
# yamllint disable-line rule:truthy
|
||||||
@ -13,8 +14,11 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
PYTHON_VERSION: "3.13"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
python:
|
test:
|
||||||
# TODO: Remove this
|
# TODO: Remove this
|
||||||
if: false
|
if: false
|
||||||
name: Python ${{ matrix.python-version }}
|
name: Python ${{ matrix.python-version }}
|
||||||
@ -29,139 +33,140 @@ jobs:
|
|||||||
- "3.13"
|
- "3.13"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "${{ matrix.python-version }}"
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: "false"
|
persist-credentials: "false"
|
||||||
|
|
||||||
- name: Install Ubuntu packages
|
- name: Setup cache Python
|
||||||
run: sudo ./utils/searxng.sh install packages
|
uses: actions/cache@v4
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
with:
|
||||||
python-version: "${{ matrix.python-version }}"
|
key: "python-${{ matrix.python-version }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
||||||
|
restore-keys: "python-${{ matrix.python-version }}-${{ runner.arch }}-"
|
||||||
|
path: "./local/"
|
||||||
|
|
||||||
|
- name: Setup venv
|
||||||
|
run: make V=1 install
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: make V=1 ci.test
|
run: make V=1 ci.test
|
||||||
|
|
||||||
themes:
|
theme:
|
||||||
# TODO: Remove this
|
# TODO: Remove this
|
||||||
if: false
|
if: false
|
||||||
name: Themes
|
name: Theme
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04-arm
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: "false"
|
persist-credentials: "false"
|
||||||
|
|
||||||
- name: Install Ubuntu packages
|
- name: Setup Node.js
|
||||||
run: sudo ./utils/searxng.sh install buildhost
|
uses: actions/setup-node@v4
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
with:
|
||||||
python-version: "3.13"
|
node-version-file: "./.nvmrc"
|
||||||
|
|
||||||
- name: Build themes
|
- name: Setup cache Node.js
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
key: "nodejs-${{ runner.arch }}-${{ hashFiles('./.nvmrc', './package.json') }}"
|
||||||
|
path: "./client/simple/node_modules/"
|
||||||
|
|
||||||
|
- name: Build
|
||||||
run: make themes.all
|
run: make themes.all
|
||||||
|
|
||||||
documentation:
|
documentation:
|
||||||
# TODO: Remove this
|
# TODO: Remove this
|
||||||
if: false
|
if: false
|
||||||
name: Documentation
|
name: Documentation
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04-arm
|
||||||
permissions:
|
permissions:
|
||||||
# for JamesIves/github-pages-deploy-action to push
|
# for JamesIves/github-pages-deploy-action to push
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "${{ env.PYTHON_VERSION }}"
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: "false"
|
persist-credentials: "false"
|
||||||
fetch-depth: "0"
|
fetch-depth: "0"
|
||||||
|
|
||||||
- name: Install Ubuntu packages
|
- name: Setup cache Python
|
||||||
run: sudo ./utils/searxng.sh install buildhost
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.13"
|
|
||||||
|
|
||||||
- name: Cache Python dependencies
|
|
||||||
id: cache-python
|
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
||||||
./local
|
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
||||||
./.nvm
|
path: "./local/"
|
||||||
./node_modules
|
|
||||||
key: python-ubuntu-24.04-3.13-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
|
- name: Setup venv
|
||||||
|
run: make V=1 install
|
||||||
|
|
||||||
- name: Build documentation
|
- name: Build documentation
|
||||||
run: make V=1 docs.clean docs.html
|
run: make V=1 docs.clean docs.html
|
||||||
|
|
||||||
- if: github.ref == 'refs/heads/master'
|
- if: github.ref == 'refs/heads/master'
|
||||||
name: Deploy
|
name: Deploy
|
||||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
uses: JamesIves/github-pages-deploy-action@v4
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: "${{ github.token }}"
|
folder: "dist/docs"
|
||||||
BRANCH: "gh-pages"
|
branch: "gh-pages"
|
||||||
FOLDER: "dist/docs"
|
commit-message: "[doc] build from commit ${{ github.sha }}"
|
||||||
# Automatically remove deleted files from the deploy branch
|
# Automatically remove deleted files from the deploy branch
|
||||||
CLEAN: "true"
|
clean: "true"
|
||||||
SINGLE_COMMIT: "true"
|
single-commit: "true"
|
||||||
COMMIT_MESSAGE: "[doc] build from commit ${{ github.sha }}"
|
|
||||||
|
|
||||||
babel:
|
babel:
|
||||||
# TODO: Remove this
|
if: github.repository_owner == 'searxng' && github.ref == 'refs/heads/master'
|
||||||
if: false
|
|
||||||
# if: github.repository_owner == 'searxng' && github.ref == 'refs/heads/master'
|
|
||||||
name: Update translations branch
|
name: Update translations branch
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04-arm
|
||||||
needs:
|
needs:
|
||||||
- python
|
- test
|
||||||
- themes
|
- theme
|
||||||
- documentation
|
- documentation
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
# for make V=1 weblate.push.translations
|
# For "make V=1 weblate.push.translations"
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "${{ env.PYTHON_VERSION }}"
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
token: "${{ secrets.WEBLATE_GITHUB_TOKEN }}"
|
token: "${{ secrets.WEBLATE_GITHUB_TOKEN }}"
|
||||||
fetch-depth: "0"
|
fetch-depth: "0"
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Setup cache Python
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.13"
|
|
||||||
|
|
||||||
- name: Cache Python dependencies
|
|
||||||
id: cache-python
|
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
|
||||||
./local
|
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
|
||||||
./.nvm
|
path: "./local/"
|
||||||
./node_modules
|
|
||||||
key: python-ubuntu-20.04-3.13-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
|
- name: Setup venv
|
||||||
|
run: make V=1 install
|
||||||
|
|
||||||
- name: weblate & git setup
|
- name: weblate & git setup
|
||||||
env:
|
|
||||||
WEBLATE_CONFIG: "${{ secrets.WEBLATE_CONFIG }}"
|
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.config
|
mkdir -p ~/.config
|
||||||
echo "${WEBLATE_CONFIG}" > ~/.config/weblate
|
echo "${{ secrets.WEBLATE_CONFIG }}" > ~/.config/weblate
|
||||||
git config --global user.email "searxng-bot@users.noreply.github.com"
|
git config --global user.email "searxng-bot@users.noreply.github.com"
|
||||||
git config --global user.name "searxng-bot"
|
git config --global user.name "searxng-bot"
|
||||||
|
|
||||||
- name: Update transations
|
- name: Update transations
|
||||||
id: update
|
|
||||||
run: make V=1 weblate.push.translations
|
run: make V=1 weblate.push.translations
|
||||||
|
Loading…
x
Reference in New Issue
Block a user