-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (49 loc) · 1.61 KB
/
Copy pathci.yml
File metadata and controls
54 lines (49 loc) · 1.61 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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Continuous Integration
on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]
permissions:
contents: read
jobs:
testing:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nox
pip install uv
uv sync --group dev
- name: Run pre-commit
run: |
uv run pre-commit install
uv run pre-commit run --all-files
- name: Test Backend
if:
github.event.action == 'synchronize' && (contains(github.event.pull_request.changed_files,
'mqss') || contains(github.event.pull_request.changed_files, 'tests'))
env:
MQP_TOKEN: ${{ secrets.MQP_TOKEN }}
run: |
nox --session test_backend
- name: Test Job when PR is merged
if:
github.event.pull_request.merged == true &&
(contains(github.event.pull_request.changed_files, 'mqss') ||
contains(github.event.pull_request.changed_files, 'tests'))
env:
MQP_TOKEN: ${{ secrets.MQP_TOKEN }}
run: |
nox --session test_job