Debian Codegraph @

.github/workflows/main-ci.yml

raw
1 name: Django Main Testing CI
2
3 on:
4 schedule:
5 - cron: "0 2 * * *"
6 workflow_dispatch:
7
8 jobs:
9 build:
10 runs-on: ubuntu-latest
11 strategy:
12 fail-fast: false
13 matrix:
14 python-version: ['3.14']
15
16 services:
17 redis:
18 image: redis:6
19 ports:
20 - 6379:6379
21 postgres:
22 image: postgres
23 ports:
24 - 5432:5432
25 env:
26 POSTGRES_USER: cachalot
27 POSTGRES_PASSWORD: password
28 POSTGRES_DB: cachalot
29 options: >-
30 --health-cmd pg_isready
31 --health-interval 10s
32 --health-timeout 5s
33 --health-retries 5
34 mysql:
35 image: mysql
36 env:
37 MYSQL_ALLOW_EMPTY_PASSWORD: yes
38 MYSQL_DATABASE: cachalot
39 ports:
40 - 3306:3306
41 memcached:
42 image: memcached
43 ports:
44 - 11211:11211
45
46 steps:
47 - uses: actions/checkout@v6
48 - name: Set up Python ${{ matrix.python-version }}
49 uses: actions/setup-python@v6
50 with:
51 python-version: ${{ matrix.python-version }}
52 - name: Get pip cache dir
53 id: pip-cache
54 run: |
55 echo "::set-output name=dir::$(pip cache dir)"
56 - name: Cache
57 uses: actions/cache@v4
58 with:
59 path: ${{ steps.pip-cache.outputs.dir }}
60 key:
61 ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}
62 restore-keys: |
63 ${{ matrix.python-version }}-v1-
64 - name: Install dependencies
65 run: |
66 sudo apt-get install -y libmemcached-dev zlib1g-dev
67 python -m pip install --upgrade pip wheel
68 python -m pip install tox tox-gh-actions coveralls
69 - name: Tox Test
70 run: tox
71 env:
72 TOX_TESTENV_PASSENV: POSTGRES_PASSWORD
73 POSTGRES_PASSWORD: password
74 DJANGO: 'main'