@@ -0,0 +1,110 @@
1+name: Integration
2+
3+on: [push, pull_request]
4+
5+jobs:
6+ python:
7+ name: Python ${{ matrix.python-version }}
8+ runs-on: ubuntu-latest
9+ strategy:
10+ matrix:
11+ os: [ubuntu-latest]
12+ python-version: [3.5, 3.6, 3.7, 3.8]
13+ steps:
14+ - name: Checkout 🛎️
15+ uses: actions/checkout@v2
16+ - name: Install Ubuntu packages 🧰
17+ run: |
18+ sudo ./utils/searx.sh install packages
19+ sudo apt install firefox
20+ - name: Set up Python 🧰
21+ uses: actions/setup-python@v2
22+ with:
23+ python-version: ${{ matrix.python-version }}
24+ architecture: 'x64'
25+ - name: Install Python dependencies 🧰
26+ run: |
27+ make V=1 install
28+ make V=1 gecko.driver
29+ - name: Run tests 🏗️
30+ run: make V=1 test
31+ - name: Test coverage 🗺️
32+ run: make V=1 test.coverage
33+ - name: Store coverage result 🗺️
34+ uses: actions/upload-artifact@v2
35+ with:
36+ name: coverage-${{ matrix.python-version }}
37+ path: coverage/
38+ retention-days: 60
39+
40+ themes:
41+ name: Themes
42+ runs-on: ubuntu-latest
43+ steps:
44+ - name: Checkout 🛎️
45+ uses: actions/checkout@v2
46+ - name: Install Ubuntu packages 🧰
47+ run: sudo ./utils/searx.sh install packages
48+ - name: Install node dependencies 🧰
49+ run: make V=1 node.env
50+ - name: Build themes 🏗️
51+ run: make V=1 themes
52+
53+ documentation:
54+ name: Documentation
55+ runs-on: ubuntu-latest
56+ steps:
57+ - name: Checkout 🛎️
58+ uses: actions/checkout@v2
59+ with:
60+ persist-credentials: false
61+ - name: Install Ubuntu packages 🧰
62+ run: sudo ./utils/searx.sh install buildhost
63+ - name: Set up Python 🧰
64+ uses: actions/setup-python@v2
65+ with:
66+ python-version: '3.9'
67+ architecture: 'x64'
68+ - name: Build documentation 🏗️
69+ run: SEARX_DEBUG=1 make V=1 travis-gh-pages
70+ - name: Deploy 🚀
71+ if: github.ref == 'ref/head/master'
72+ uses: JamesIves/github-pages-deploy-action@e774cc50ed6e8e667bca6a331d2a3ba80c79debc
73+ with:
74+ GITHUB_TOKEN: ${{ github.token }}
75+ BRANCH: gh-pages
76+ FOLDER: gh-pages
77+ CLEAN: true # Automatically remove deleted files from the deploy branch
78+
79+ dockers:
80+ name: Docker
81+ if: github.ref == 'ref/head/master'
82+ needs:
83+ - python
84+ - themes
85+ - documentation
86+ env:
87+ DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
88+ runs-on: ubuntu-latest
89+ steps:
90+ - name: Checkout 🛎️
91+ if: env.DOCKERHUB_USERNAME != null
92+ uses: actions/checkout@v2
93+ with:
94+ # make sure "make docker.push" can get the git history
95+ fetch-depth: '0'
96+ - name: Set up QEMU 🧰
97+ if: env.DOCKERHUB_USERNAME != null
98+ uses: docker/setup-qemu-action@v1
99+ - name: Set up Docker Buildx 🧰
100+ if: env.DOCKERHUB_USERNAME != null
101+ uses: docker/setup-buildx-action@v1
102+ - name: Login to DockerHub 🔒
103+ if: env.DOCKERHUB_USERNAME != null
104+ uses: docker/login-action@v1
105+ with:
106+ username: ${{ secrets.DOCKERHUB_USERNAME }}
107+ password: ${{ secrets.DOCKERHUB_TOKEN }}
108+ - name: Build and push 🐳
109+ if: env.DOCKERHUB_USERNAME != null
110+ run: make -e GIT_URL=$(git remote get-url origin) docker.push