-
Notifications
You must be signed in to change notification settings - Fork 102
76 lines (62 loc) · 2.34 KB
/
tests.yml
File metadata and controls
76 lines (62 loc) · 2.34 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Run tests
permissions:
contents: read
on:
push:
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
jobs:
test-python:
name: Test on Python ${{ matrix.python-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
# Debian Trixie and Debian Forky (https://tracker.debian.org/pkg/python3)
python-version: ["3.13"]
os: [ubuntu-latest]
experimental: [false]
include:
# Debian Forky (https://tracker.debian.org/pkg/python3)
- { python-version: '3.14', experimental: true, os: ubuntu-latest }
steps:
- name: "Checkout code"
uses: actions/checkout@v6
with:
# Fetch some commits for Scrutinizer coverage upload
fetch-depth: 15
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: pip install -r requirements-test.txt
- name: Run the migrations
run: ./manage.py migrate
- name: Check missing migrations
run: ./manage.py makemigrations --check
- name: Run Python checks
run: ./manage.py check
- name: Run Python tests and coverage
run: coverage run --source=. ./manage.py test
- name: Export coverage to XML
run: coverage xml
- name: Send coverage
uses: codecov/codecov-action@v5
# Do not run this step on forked versions of the main repository (example: contributor forks)
if: github.repository == 'phpmyadmin/website'
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit-${{ matrix.python-version }}-${{ matrix.os }}
name: phpunit-${{ matrix.python-version }}-${{ matrix.os }}
report_type: coverage
- name: Send coverage to Scrutinizer
uses: sudo-bot/action-scrutinizer@latest
# Do not run this step on forked versions of the main repository (example: contributor forks)
if: github.repository == 'phpmyadmin/website'
with:
cli-args: "--format=php-clover coverage.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"