-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (41 loc) · 1.04 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: test
on:
workflow_call:
push:
branches-ignore:
- master
- release-please--*
jobs:
test:
runs-on: ubuntu-latest
services:
db:
image: mariadb:10
env:
MYSQL_DATABASE: "wp"
MYSQL_USER: "wp"
MYSQL_PASSWORD: "wp"
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
ports:
- 3306:3306
steps:
- name: Check out sources
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Cache Python Dependencies
uses: actions/cache@v3
id: cache-python
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-python-env
- name: Install Python dependencies
if: steps.cache-python.outputs.cache-hit != 'true'
run: |
pip install -U pip pip-tools setuptools
pip-sync requirements/*.txt
- name: Run tests
run: WP_SKIP_TEST_DB_FIXTURE=1 pytest