File tree Expand file tree Collapse file tree 1 file changed +68
-0
lines changed
Expand file tree Collapse file tree 1 file changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ python-version : ['3.11', '3.12']
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - name : Set up Python ${{ matrix.python-version }}
20+ uses : actions/setup-python@v5
21+ with :
22+ python-version : ${{ matrix.python-version }}
23+
24+ - name : Install dependencies
25+ run : |
26+ python -m pip install --upgrade pip
27+ pip install -e ".[test]"
28+
29+ - name : Run linters
30+ run : |
31+ pip install ruff black mypy
32+ ruff check .
33+ black --check .
34+
35+ - name : Run unit tests
36+ run : |
37+ pytest tests/unit -v --cov=amazon_ads_api --cov-report=xml
38+
39+ - name : Upload coverage
40+ uses : codecov/codecov-action@v4
41+ with :
42+ files : ./coverage.xml
43+ flags : unittests
44+ name : codecov-umbrella
45+
46+ build :
47+ runs-on : ubuntu-latest
48+ needs : test
49+
50+ steps :
51+ - uses : actions/checkout@v4
52+
53+ - name : Set up Python
54+ uses : actions/setup-python@v5
55+ with :
56+ python-version : ' 3.11'
57+
58+ - name : Build package
59+ run : |
60+ pip install build
61+ python -m build
62+
63+ - name : Upload artifacts
64+ uses : actions/upload-artifact@v4
65+ with :
66+ name : dist
67+ path : dist/
68+
You can’t perform that action at this time.
0 commit comments