-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (54 loc) · 1.55 KB
/
test.yml
File metadata and controls
54 lines (54 loc) · 1.55 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
name: Run specs and generate Code Climate report
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
name: "Linting with Flake8"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Lint with flake8
run: |
pip install flake8
flake8 ./chartmogul
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-versions: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-versions }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-versions }}
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel coverage
pip install -e .[testing]
- name: Run tests
run: coverage run -m unittest && coverage xml -i --include='chartmogul/*'