File tree 5 files changed +50
-1
lines changed
5 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 26
26
- run : make lint
27
27
28
28
- run : make coverage
29
+ if : github.ref != 'refs/heads/master'
30
+
31
+ - run : make coverage-master
32
+ if : github.ref == 'refs/heads/master'
Original file line number Diff line number Diff line change
1
+ name : Release Drafter
2
+
3
+ on :
4
+ push :
5
+ # branches to consider in the event; optional, defaults to all
6
+ branches :
7
+ - master
8
+ # pull_request event is required only for autolabeler
9
+ pull_request :
10
+ # Only following types are handled by the action, but one can default to all as well
11
+ types : [opened, reopened, synchronize]
12
+ # pull_request_target event is required for autolabeler to support PRs from forks
13
+ pull_request_target :
14
+ types : [opened, reopened, synchronize]
15
+
16
+ permissions :
17
+ contents : read
18
+
19
+ jobs :
20
+ update_release_draft :
21
+ permissions :
22
+ # write permission is required to create a github release
23
+ contents : write
24
+ # write permission is required for autolabeler
25
+ # otherwise, read permission is required at least
26
+ pull-requests : write
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ # Drafts your next Release notes as Pull Requests are merged into "master"
30
+ - uses : release-drafter/release-drafter@v5
31
+ env :
32
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ coverage:
37
37
coverage xml -i -o build/coverage.xml
38
38
coverage html
39
39
40
+ coverage-master :
41
+ coverage run --source=pycfmodel --branch -m pytest tests/ --junitxml=build/test.xml -v -m " not actions"
42
+ coverage report
43
+ coverage xml -i -o build/coverage.xml
44
+ coverage html
45
+
40
46
test : lint unit
41
47
42
48
test-docs :
Original file line number Diff line number Diff line change @@ -70,4 +70,9 @@ indent-style = "space"
70
70
skip-magic-trailing-comma = false
71
71
72
72
# Like Black, automatically detect the appropriate line ending.
73
- line-ending = " auto"
73
+ line-ending = " auto"
74
+
75
+ [tool .pytest .ini_options ]
76
+ markers = [
77
+ " actions: marks tests that checks the full list of IAM actions (deselect with '-m \" not actions\" ')" ,
78
+ ]
Original file line number Diff line number Diff line change 1
1
import json
2
2
3
3
import httpx
4
+ import pytest
4
5
5
6
from pycfmodel .cloudformation_actions import CLOUDFORMATION_ACTIONS
6
7
7
8
9
+ @pytest .mark .actions
8
10
def test_cloudformation_actions ():
9
11
response = httpx .get ("https://awspolicygen.s3.amazonaws.com/js/policies.js" )
10
12
response .raise_for_status ()
You can’t perform that action at this time.
0 commit comments