@@ -5,44 +5,48 @@ name: Python package
55
66on :
77 push :
8- branches : [ master ]
8+ branches : [master]
99 pull_request :
10- branches : [ master ]
10+ branches : [master]
11+
12+ permissions :
13+ contents : read
14+ id-token : write
1115
1216jobs :
1317 build :
14-
1518 runs-on : ubuntu-latest
1619 strategy :
1720 fail-fast : false
1821 matrix :
1922 python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
2023
2124 steps :
22- - uses : actions/checkout@v4
23- - name : Set up Python ${{ matrix.python-version }}
24- uses : actions/setup-python@v5
25- with :
26- python-version : ${{ matrix.python-version }}
27- - name : Install dependencies
28- run : |
29- python -m pip install --upgrade pip
30- pip install -r requirements.txt -r dev-requirements.txt
31- pip install -e .
32- - name : Lint with flake8
33- run : |
34- # stop the build if there are Python syntax errors or undefined names
35- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38- - name : Lint with PyLint
39- run : pylint --rcfile=.pylintrc src/aws_secretsmanager_caching
40- - name : Check formatting with Ruff
41- uses : astral-sh/ruff-action@v3
42- - name : Test with pytest
43- run : |
44- pytest test/unit/
45- - name : Upload coverage to Codecov
46- uses : codecov/codecov-action@v5
47- env :
48- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
25+ - uses : actions/checkout@v4
26+ - name : Set up Python ${{ matrix.python-version }}
27+ uses : actions/setup-python@v5
28+ with :
29+ python-version : ${{ matrix.python-version }}
30+ - name : Install dependencies
31+ run : |
32+ python -m pip install --upgrade pip
33+ pip install -r requirements.txt -r dev-requirements.txt
34+ pip install -e .
35+ - name : Lint with flake8
36+ run : |
37+ # stop the build if there are Python syntax errors or undefined names
38+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
39+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
40+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
41+ - name : Lint with PyLint
42+ run : pylint --rcfile=.pylintrc src/aws_secretsmanager_caching
43+ - name : Check formatting with Ruff
44+ uses : astral-sh/ruff-action@v3
45+ - name : Test with pytest
46+ run : |
47+ pytest test/unit/
48+ - name : Upload coverage to Codecov
49+ uses : codecov/codecov-action@v5
50+ with :
51+ fail_ci_if_error : true
52+ use_oidc : true
0 commit comments