on master help sign in
[mod] GitHub workflow: use cache
fb01807Alexandre Flament
.github/workflows/integration.yml+30−1
@@ -56,6 +56,17 @@ jobs:
56 uses: actions/checkout@v2
56 uses: actions/checkout@v2
57 - name: Install Ubuntu packages
57 - name: Install Ubuntu packages
58 run: sudo ./utils/searx.sh install packages
58 run: sudo ./utils/searx.sh install packages
59+ - name: Set up Python
60+ uses: actions/setup-python@v2
61+ with:
62+ python-version: '3.9'
63+ architecture: 'x64'
64+ - name: Cache Python dependencies
65+ id: cache-python
66+ uses: actions/cache@v2
67+ with:
68+ path: ./local
69+ key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py') }}
59 - name: Install node dependencies
70 - name: Install node dependencies
60 run: make V=1 node.env
71 run: make V=1 node.env
61 - name: Build themes
72 - name: Build themes
@@ -68,6 +79,7 @@ jobs:
68 - name: Checkout
79 - name: Checkout
69 uses: actions/checkout@v2
80 uses: actions/checkout@v2
70 with:
81 with:
82+ fetch-depth: '0'
71 persist-credentials: false
83 persist-credentials: false
72 - name: Install Ubuntu packages
84 - name: Install Ubuntu packages
73 run: sudo ./utils/searx.sh install buildhost
85 run: sudo ./utils/searx.sh install buildhost
@@ -76,6 +88,12 @@ jobs:
76 with:
88 with:
77 python-version: '3.9'
89 python-version: '3.9'
78 architecture: 'x64'
90 architecture: 'x64'
91+ - name: Cache Python dependencies
92+ id: cache-python
93+ uses: actions/cache@v2
94+ with:
95+ path: ./local
96+ key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py') }}
79 - name: Build documentation
97 - name: Build documentation
80 run: |
98 run: |
81 make V=1 docs.clean docs.html
99 make V=1 docs.clean docs.html
@@ -97,7 +115,7 @@ jobs:
97 - documentation
115 - documentation
98 env:
116 env:
99 DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
117 DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
100− runs-on: ubuntu-18.04
118+ runs-on: ubuntu-20.04
101 steps:
119 steps:
102 - name: Checkout
120 - name: Checkout
103 if: env.DOCKERHUB_USERNAME != null
121 if: env.DOCKERHUB_USERNAME != null
@@ -105,6 +123,17 @@ jobs:
105 with:
123 with:
106 # make sure "make docker.push" can get the git history
124 # make sure "make docker.push" can get the git history
107 fetch-depth: '0'
125 fetch-depth: '0'
126+ - name: Set up Python
127+ uses: actions/setup-python@v2
128+ with:
129+ python-version: '3.9'
130+ architecture: 'x64'
131+ - name: Cache Python dependencies
132+ id: cache-python
133+ uses: actions/cache@v2
134+ with:
135+ path: ./local
136+ key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py') }}
108 - name: Set up QEMU
137 - name: Set up QEMU
109 if: env.DOCKERHUB_USERNAME != null
138 if: env.DOCKERHUB_USERNAME != null
110 uses: docker/setup-qemu-action@v1
139 uses: docker/setup-qemu-action@v1