-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (51 loc) · 1.34 KB
/
ci-pipeline.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
42
43
44
45
46
47
48
49
50
51
52
53
54
name: tests
on:
push:
branches:
- main
pull_request:
jobs:
syntax-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Python setup
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install test dependencies
run: pip install -r requirements-tests.txt
- name: Check syntax with black
run: black --check django_comments_ink
django:
runs-on: ubuntu-latest
strategy:
matrix:
django: ["4.1", "4.2", "5.0"]
steps:
- uses: actions/checkout@v4
- name: Python setup
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install tox and django
run: pip install tox "django==${{ matrix.django }}"
- name: Run unit tests
run: tox -e py3.12-django${{ matrix.django }}
javascript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: npm test