Skip to content

Commit

Permalink
Merge fb44654 into d5082cc
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksanders committed Jun 2, 2021
2 parents d5082cc + fb44654 commit 4bf3dba
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Python package

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

jobs:
build:
Expand All @@ -27,18 +31,10 @@ jobs:
pre-commit run -a
- name: Test with pytest/coverage
run: |
pip install pytest coveralls
coverage run -a -m py.test policyuniverse/tests/test_expander_minimizer.py
coverage run -a -m py.test policyuniverse/tests/test_arn.py
coverage run -a -m py.test policyuniverse/tests/test_statement.py
coverage run -a -m py.test policyuniverse/tests/test_policy.py
coverage run -a -m py.test updater/test_service.py
coverage run -a -m py.test updater/test_service_action.py
- name: Upload coverage data under py37
pip install pytest pytest-cov coveralls==2.2.0
pytest --cov
- name: Upload coverage data to coveralls.io
if: success() && matrix.python-version == '3.7'
run: coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: success() && matrix.python-version == '3.7' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
run: |
coveralls --service=github
14 changes: 11 additions & 3 deletions .github/workflows/updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Set up NodeJS
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Download phantomjs
run: |
pwd &&\
Expand Down Expand Up @@ -54,7 +58,7 @@ jobs:
rm phantomjs-2.1.1-linux-x86_64.tar.bz2
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v2
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Updating PolicyUniverse SDFs
Expand All @@ -63,8 +67,12 @@ jobs:
title: 'Updating PolicyUniverse Data.json'
body: ${{ steps.runupdater.outputs.updatersummary }}
labels: data-update, automated pr
assignees: scriptsrc
reviewers: scriptsrc
assignees: |
scriptsrc
patricksanders
reviewers: |
scriptsrc
patricksanders
team-reviewers: owners, maintainers
draft: false
branch: auto_data_update
Expand Down
1 change: 1 addition & 0 deletions updater/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def main():

with open("output_formatted.json", "w") as outfile:
json.dump(service_data, outfile, indent=2, sort_keys=True)
outfile.write("\n")

# print(json.dumps(service_data, indent=2, sort_keys=True))

Expand Down

0 comments on commit 4bf3dba

Please sign in to comment.