Skip to content

Move CI from TravisCI to GitHub Actions #654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 22, 2020

Conversation

johnttompkins
Copy link
Contributor

@johnttompkins johnttompkins commented Dec 16, 2020

Issue #, if available:

Description of changes: Adds CI job that achieves parity with the current travis PR run (runs pre-commit). The other file also handles releasing to PyPI. There is a scoped token that we have uploaded as a github secret that we can use to publish to our PyPI repo. Tested on my repo with a test token and test repository:

/usr/bin/docker run --name a9377fd141b0b7cce9fa0615d628_7d5844 --label 179394 --workdir /github/workspace --rm -e AWS_DEFAULT_REGION -e pythonLocation -e LD_LIBRARY_PATH -e INPUT_PASSWORD -e INPUT_REPOSITORY_URL -e INPUT_USER -e INPUT_PACKAGES_DIR -e INPUT_VERIFY_METADATA -e INPUT_SKIP_EXISTING -e INPUT_VERBOSE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/cloudformation-cli/cloudformation-cli":"/github/workspace" 179394:5265a9377fd141b0b7cce9fa0615d628  "__token__" "***" "https://test.pypi.org/legacy/" "dist" "true" "false" "false"
Checking dist/cloudformation_cli-0.2.1-py3-none-any.whl: PASSED
Checking dist/cloudformation-cli-0.2.1.tar.gz: PASSED
Uploading distributions to https://test.pypi.org/legacy/
Uploading cloudformation_cli-0.2.1-py3-none-any.whl

  0%|          | 0.00/96.2k [00:00<?, ?B/s]
100%|██████████| 96.2k/96.2k [00:01<00:00, 66.1kB/s]
Uploading cloudformation-cli-0.2.1.tar.gz

  0%|          | 0.00/74.8k [00:00<?, ?B/s]
100%|██████████| 74.8k/74.8k [00:01<00:00, 69.1kB/s]

View at:
https://test.pypi.org/project/cloudformation-cli/0.2.1/

Very similar to aws-cloudformation/cloudformation-cli-python-plugin#138

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@PatMyron
Copy link
Contributor

PatMyron commented Dec 21, 2020

Can we remove .travis.yml in these PRs as well? Easier to review the diff for parity if that's part of the PR

@johnttompkins
Copy link
Contributor Author

Can we remove .travis.yml in these PRs as well? Easier to review the diff for parity if that's part of the PR

Removed it in the last commit. Checks will show as incomplete since we require a travis success in the repo settings and there isn't one in this PR now. Will remove requirement once this is approved.

AWS_DEFAULT_REGION: us-east-1
strategy:
matrix:
python: [3.6, 3.7, 3.8]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably currently stuck on pylint support like the plugin, but we should eventually run this for Python 3.9 as well:

Suggested change
python: [3.6, 3.7, 3.8]
python: [3.6, 3.7, 3.8, 3.9]

@johnttompkins johnttompkins merged commit c53c6da into aws-cloudformation:master Dec 22, 2020
@johnttompkins johnttompkins deleted the gh-actions branch December 22, 2020 18:59
Comment on lines +13 to +14
env:
AWS_DEFAULT_REGION: us-east-1
Copy link
Contributor

@PatMyron PatMyron Dec 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this environment variable used for anything btw?

Suggested change
env:
AWS_DEFAULT_REGION: us-east-1

prerna-p pushed a commit to prerna-p/cloudformation-cli that referenced this pull request Dec 29, 2020
* Add GitHub actions equivalent CI

* Remove travis spec to show parity

Co-authored-by: Pat Myron <[email protected]>
prerna-p pushed a commit to prerna-p/cloudformation-cli that referenced this pull request Dec 29, 2020
* Add GitHub actions equivalent CI

* Remove travis spec to show parity

Co-authored-by: Pat Myron <[email protected]>
@PatMyron PatMyron changed the title Add GitHub Actions CI Job Move CI from TravisCI to GitHub Actions Jan 11, 2021
kddejong pushed a commit to kddejong/cloudformation-cli that referenced this pull request Oct 24, 2022
* Add GitHub actions equivalent CI

* Remove travis spec to show parity

Co-authored-by: Pat Myron <[email protected]>
kddejong pushed a commit to kddejong/cloudformation-cli that referenced this pull request Oct 24, 2022
* Add GitHub actions equivalent CI

* Remove travis spec to show parity

Co-authored-by: Pat Myron <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants