Skip to content

Commit 81c1ce6

Browse files
author
John Tompkins
authored
Move CI from TravisCI to GitHub Actions (#138)
* Add CI * Remove travisci
1 parent da16e48 commit 81c1ce6

File tree

3 files changed

+45
-56
lines changed

3 files changed

+45
-56
lines changed

.github/workflows/pr-ci.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: CloudFormation Python Plugin CI
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
env:
15+
AWS_DEFAULT_REGION: us-east-1
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
python: [3.6, 3.7, 3.8]
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python ${{ matrix.python }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python }}
26+
- name: Install dependencies
27+
run: |
28+
pip install --upgrade mypy 'attrs==19.2.0' -r https://raw.githubusercontent.com/aws-cloudformation/aws-cloudformation-rpdk/master/requirements.txt
29+
- name: Install both plugin and support lib
30+
run: |
31+
pip install . src/
32+
- name: pre-commit checks
33+
run: |
34+
pre-commit run --all-files
35+
- name: End to End Resource Packaging Test Python 3.6
36+
run: ./e2e-test.sh python36
37+
- name: End to End Resource Packaging Test Python 3.7
38+
run: ./e2e-test.sh python37

.travis.yml

-56
This file was deleted.

e2e-test.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
DIR=$(mktemp -d)
3+
cd "$DIR"
4+
ls -la
5+
cfn init -t AWS::Foo::Bar $1 --use-docker
6+
ls -la
7+
mypy src/aws_foo_bar/ --strict --implicit-reexport

0 commit comments

Comments
 (0)