Skip to content

Commit b474cb9

Browse files
ArmaanTdavish
andauthored
GH Actions Migration (#16)
* move to gh actions * Add CI * Update tox config * Migrate to poetry * Fix poetry * Disable lint :( * Add dev dep * Updates * Updates * Updates * Updates * Updates * Updates * Updates * Updates * Updates * Updates Co-authored-by: Davis Haupt <[email protected]>
1 parent ff8b20c commit b474cb9

13 files changed

+1656
-82
lines changed

.circleci/config.yml

-21
This file was deleted.

.github/cdk/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
main.js
3+
main.d.ts

.github/cdk/cdkactions.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
language: typescript
2+
app: node main.js

.github/cdk/main.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// import dedent from 'ts-dedent';
2+
import { App } from "cdkactions";
3+
import { PyPIPublishStack } from "@pennlabs/kraken";
4+
5+
const app = new App();
6+
new PyPIPublishStack(app, {
7+
pythonMatrixVersions: [3.7, 3.8, 3.9]
8+
});
9+
10+
app.synth();

.github/cdk/package.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "cdk",
3+
"version": "0.1.0",
4+
"main": "main.js",
5+
"types": "main.ts",
6+
"license": "Apache-2.0",
7+
"private": true,
8+
"scripts": {
9+
"synth": "cdkactions synth",
10+
"compile": "tsc",
11+
"watch": "tsc -w",
12+
"build": "yarn compile && yarn synth",
13+
"upgrade-cdk": "yarn upgrade cdkactions@latest cdkactions-cli@latest"
14+
},
15+
"dependencies": {
16+
"@pennlabs/kraken": "^0.6.4",
17+
"cdkactions": "^0.2.3",
18+
"constructs": "^3.2.109"
19+
},
20+
"devDependencies": {
21+
"@types/node": "^16.11.9",
22+
"cdkactions-cli": "^0.2.3",
23+
"typescript": "^4.5.2"
24+
}
25+
}

.github/cdk/tsconfig.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"compilerOptions": {
3+
"alwaysStrict": true,
4+
"charset": "utf8",
5+
"declaration": true,
6+
"experimentalDecorators": true,
7+
"inlineSourceMap": true,
8+
"inlineSources": true,
9+
"lib": [
10+
"es2018"
11+
],
12+
"module": "CommonJS",
13+
"noEmitOnError": true,
14+
"noFallthroughCasesInSwitch": true,
15+
"noImplicitAny": true,
16+
"noImplicitReturns": true,
17+
"noImplicitThis": true,
18+
"noUnusedLocals": true,
19+
"noUnusedParameters": true,
20+
"resolveJsonModule": true,
21+
"strict": true,
22+
"strictNullChecks": true,
23+
"strictPropertyInitialization": true,
24+
"stripInternal": true,
25+
"target": "ES2018"
26+
},
27+
"include": [
28+
"**/*.ts"
29+
],
30+
"exclude": [
31+
"node_modules"
32+
]
33+
}

.github/cdk/yarn.lock

+211
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
"@pennlabs/kraken@^0.6.4":
6+
version "0.6.4"
7+
resolved "https://registry.yarnpkg.com/@pennlabs/kraken/-/kraken-0.6.4.tgz#7b8d90c461dcf4574b7ccf0df76e400c94eea381"
8+
integrity sha512-/K5cuZlfCzGq1JVVUHZ6KyeYX8IJLV6H3QAHYIALhlvM6pz/0y0YJ5BGcroH0qKtkxHob9NjiTXjokvi60ZeTw==
9+
dependencies:
10+
cdkactions "^0.2.0"
11+
constructs "^3.2.80"
12+
dedent-js "^1.0.1"
13+
14+
"@types/node@^16.11.9":
15+
version "16.11.9"
16+
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.9.tgz#879be3ad7af29f4c1a5c433421bf99fab7047185"
17+
integrity sha512-MKmdASMf3LtPzwLyRrFjtFFZ48cMf8jmX5VRYrDQiJa8Ybu5VAmkqBWqKU8fdCwD8ysw4mQ9nrEHvzg6gunR7A==
18+
19+
ansi-regex@^5.0.1:
20+
version "5.0.1"
21+
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
22+
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
23+
24+
ansi-styles@^4.0.0:
25+
version "4.3.0"
26+
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
27+
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
28+
dependencies:
29+
color-convert "^2.0.1"
30+
31+
argparse@^2.0.1:
32+
version "2.0.1"
33+
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
34+
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
35+
36+
cdkactions-cli@^0.2.3:
37+
version "0.2.3"
38+
resolved "https://registry.yarnpkg.com/cdkactions-cli/-/cdkactions-cli-0.2.3.tgz#2393682b37ab0b04c6964160b393e8d71b08118f"
39+
integrity sha512-qYPbzuQ1M5gQGa8NRnaWwm3iXmdqMoiHR7YTh6oYROpfBGER7kwBBb6ydFlSwKK62hE0B++by43hbEBXlHvr8A==
40+
dependencies:
41+
cdkactions "^0.2.3"
42+
constructs "^3.2.109"
43+
fs-extra "^8.1.0"
44+
sscaff "^1.2.0"
45+
yaml "^1.10.0"
46+
yargs "^16.2.0"
47+
48+
cdkactions@^0.2.0, cdkactions@^0.2.3:
49+
version "0.2.3"
50+
resolved "https://registry.yarnpkg.com/cdkactions/-/cdkactions-0.2.3.tgz#aa27bf720962376d54f8ef95cdfb0ab46458b966"
51+
integrity sha512-/DYQ2qsT6fzgZB+cmQjtPqR4aAWCqAytWbFpJK+iJLQ4jQrl6l4uMf01TLiWY3mAILS0YGlwPcoBbGvq9Jnz5g==
52+
dependencies:
53+
js-yaml "^4.0.0"
54+
ts-dedent "^2.0.0"
55+
56+
cliui@^7.0.2:
57+
version "7.0.4"
58+
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
59+
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
60+
dependencies:
61+
string-width "^4.2.0"
62+
strip-ansi "^6.0.0"
63+
wrap-ansi "^7.0.0"
64+
65+
color-convert@^2.0.1:
66+
version "2.0.1"
67+
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
68+
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
69+
dependencies:
70+
color-name "~1.1.4"
71+
72+
color-name@~1.1.4:
73+
version "1.1.4"
74+
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
75+
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
76+
77+
constructs@^3.2.109, constructs@^3.2.80:
78+
version "3.3.161"
79+
resolved "https://registry.yarnpkg.com/constructs/-/constructs-3.3.161.tgz#9726b1d450f3b9aca7907230f2248e3fd4058ce4"
80+
integrity sha512-/27vW3fo0iyb3py4vKI1BduEYmv8vv8uJgLXvI+5F0Jbnn0/E+As2wkGMa7bumhzCd0Ckv/USkAXstGYVXTYQA==
81+
82+
dedent-js@^1.0.1:
83+
version "1.0.1"
84+
resolved "https://registry.yarnpkg.com/dedent-js/-/dedent-js-1.0.1.tgz#bee5fb7c9e727d85dffa24590d10ec1ab1255305"
85+
integrity sha1-vuX7fJ5yfYXf+iRZDRDsGrElUwU=
86+
87+
emoji-regex@^8.0.0:
88+
version "8.0.0"
89+
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
90+
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
91+
92+
escalade@^3.1.1:
93+
version "3.1.1"
94+
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
95+
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
96+
97+
fs-extra@^8.1.0:
98+
version "8.1.0"
99+
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
100+
integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
101+
dependencies:
102+
graceful-fs "^4.2.0"
103+
jsonfile "^4.0.0"
104+
universalify "^0.1.0"
105+
106+
get-caller-file@^2.0.5:
107+
version "2.0.5"
108+
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
109+
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
110+
111+
graceful-fs@^4.1.6, graceful-fs@^4.2.0:
112+
version "4.2.8"
113+
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a"
114+
integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==
115+
116+
is-fullwidth-code-point@^3.0.0:
117+
version "3.0.0"
118+
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
119+
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
120+
121+
js-yaml@^4.0.0:
122+
version "4.1.0"
123+
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
124+
integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
125+
dependencies:
126+
argparse "^2.0.1"
127+
128+
jsonfile@^4.0.0:
129+
version "4.0.0"
130+
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
131+
integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
132+
optionalDependencies:
133+
graceful-fs "^4.1.6"
134+
135+
require-directory@^2.1.1:
136+
version "2.1.1"
137+
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
138+
integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
139+
140+
sscaff@^1.2.0:
141+
version "1.2.135"
142+
resolved "https://registry.yarnpkg.com/sscaff/-/sscaff-1.2.135.tgz#b78357e71ce69623531f996e9b960e51375ed38b"
143+
integrity sha512-m9KIfJaR3vp4S2aVDDdCz9fumMUzbvxraI+nLGLFi0dCyTCEsImxdJtTlRgdP33UPk4uR2UviQhzIV7iag+/aw==
144+
145+
string-width@^4.1.0, string-width@^4.2.0:
146+
version "4.2.3"
147+
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
148+
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
149+
dependencies:
150+
emoji-regex "^8.0.0"
151+
is-fullwidth-code-point "^3.0.0"
152+
strip-ansi "^6.0.1"
153+
154+
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
155+
version "6.0.1"
156+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
157+
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
158+
dependencies:
159+
ansi-regex "^5.0.1"
160+
161+
ts-dedent@^2.0.0:
162+
version "2.2.0"
163+
resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5"
164+
integrity sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==
165+
166+
typescript@^4.5.2:
167+
version "4.5.2"
168+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.2.tgz#8ac1fba9f52256fdb06fb89e4122fa6a346c2998"
169+
integrity sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==
170+
171+
universalify@^0.1.0:
172+
version "0.1.2"
173+
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
174+
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
175+
176+
wrap-ansi@^7.0.0:
177+
version "7.0.0"
178+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
179+
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
180+
dependencies:
181+
ansi-styles "^4.0.0"
182+
string-width "^4.1.0"
183+
strip-ansi "^6.0.0"
184+
185+
y18n@^5.0.5:
186+
version "5.0.8"
187+
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
188+
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
189+
190+
yaml@^1.10.0:
191+
version "1.10.2"
192+
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
193+
integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==
194+
195+
yargs-parser@^20.2.2:
196+
version "20.2.9"
197+
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
198+
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
199+
200+
yargs@^16.2.0:
201+
version "16.2.0"
202+
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
203+
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
204+
dependencies:
205+
cliui "^7.0.2"
206+
escalade "^3.1.1"
207+
get-caller-file "^2.0.5"
208+
require-directory "^2.1.1"
209+
string-width "^4.2.0"
210+
y18n "^5.0.5"
211+
yargs-parser "^20.2.2"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Generated by cdkactions. Do not modify
2+
# Generated as part of the 'pypi' stack.
3+
name: Build and Publish
4+
on:
5+
push:
6+
branches:
7+
- "**"
8+
tags:
9+
- "[0-9]+.[0-9]+.[0-9]+"
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version:
16+
- 3.7
17+
- 3.8
18+
- 3.9
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install dependencies
26+
run: pip install poetry tox tox-gh-actions codecov
27+
- name: Test
28+
run: tox
29+
- name: Upload Code Coverage
30+
run: codecov
31+
publish:
32+
runs-on: ubuntu-latest
33+
container:
34+
image: python:3.8
35+
needs: test
36+
if: startsWith(github.ref, 'refs/tags')
37+
steps:
38+
- uses: actions/checkout@v2
39+
- name: Verify tag
40+
run: |-
41+
GIT_TAG=${GITHUB_REF/refs\/tags\//}
42+
LIBRARY_VERSION=$(poetry version -s)
43+
if [[ "$GIT_TAG" != LIBRARY_VERSION ]]; then exit 1; fi
44+
- name: Build
45+
run: poetry build
46+
- name: Publish
47+
run: poetry publish
48+
env:
49+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_PASSWORD }}
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated by cdkactions. Do not modify
2+
# Generated as part of the 'validate' stack.
3+
name: Validate cdkactions manifests
4+
on: push
5+
jobs:
6+
validate:
7+
name: Validate cdkactions manifests
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
token: ${{ github.token }}
13+
- name: Validate manifests
14+
run: |-
15+
cd .github/cdk
16+
yarn install
17+
yarn build
18+
git --no-pager diff ../workflows
19+
git diff-index --quiet HEAD -- ../workflows
20+
- name: Push updated manifests
21+
if: "false"
22+
run: |-
23+
cd .github/workflows
24+
git config user.name github-actions
25+
git config user.email github-actions[bot]@users.noreply.github.com
26+
git add .
27+
git commit -m "Update cdkactions manifests" || exit 0
28+
git push

0 commit comments

Comments
 (0)