Skip to content

Commit 14af004

Browse files
committed
Set up jobs for Python script
1 parent 26b83d1 commit 14af004

3 files changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Check AWS cleanup script
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths:
7+
- 'aws_cleanup/**'
8+
pull_request:
9+
paths:
10+
- 'aws_cleanup/**'
11+
12+
jobs:
13+
check-aws-cleanup:
14+
name: Python checks for aws_delete.py
15+
runs-on: ubuntu-latest
16+
steps:
17+
18+
- name: Check out repository
19+
uses: actions/checkout@v3
20+
21+
- name: Set up Python 3.13
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: "3.13"
25+
26+
- name: Install dependencies
27+
run: pip install boto3 pyflakes flake8
28+
29+
- name: Check syntax
30+
run: python -m py_compile aws_cleanup/aws_delete.py
31+
32+
- name: Run pyflakes
33+
run: python -m pyflakes aws_cleanup/aws_delete.py
34+
35+
- name: Run flake8
36+
run: python -m flake8 aws_cleanup/aws_delete.py --max-line-length 120
37+
38+
- name: Verify imports
39+
run: python -c "import aws_cleanup.aws_delete"
40+
41+
- name: Check CLI --help
42+
run: python aws_cleanup/aws_delete.py --help

.github/workflows/container-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ on:
33
push:
44
branches:
55
- master
6+
paths-ignore:
7+
- 'aws_cleanup/**'
68
pull_request:
9+
paths-ignore:
10+
- 'aws_cleanup/**'
711
# schedule:
812
# - cron: 3 0 * * * # Run daily at 0:03 UTC
913

.github/workflows/run-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ on:
33
push:
44
branches:
55
- master
6+
paths-ignore:
7+
- 'aws_cleanup/**'
68
pull_request:
9+
paths-ignore:
10+
- 'aws_cleanup/**'
711
# schedule:
812
# - cron: 3 0 * * * # Run daily at 0:03 UTC
913

0 commit comments

Comments
 (0)