Skip to content

Commit 43b96d7

Browse files
committed
add badges
1 parent f93e0f6 commit 43b96d7

File tree

3 files changed

+60
-20
lines changed

3 files changed

+60
-20
lines changed

.github/workflows/ci.yml

Lines changed: 57 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,60 @@ on:
99
- master
1010

1111
jobs:
12-
CI:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v4
16-
- uses: actions/setup-python@v5
17-
with:
18-
python-version: 3.13
19-
- name: 'Install dependencies'
20-
run: pip install -r ./requirements.txt
21-
22-
- name: Setup AWS SAM
23-
uses: aws-actions/setup-sam@819220f63fb333a9a394dd0a5cab2d8303fd17e2
24-
25-
- name: Validate template
26-
run: sam validate --lint
27-
28-
- name: Run sam build
29-
run: sam build --parallel
12+
SAMLint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: 3.13
19+
- name: 'Install dependencies'
20+
run: |
21+
pip install -r ./requirements.txt
22+
pip install anybadge
23+
- name: Setup AWS SAM
24+
uses: aws-actions/setup-sam@819220f63fb333a9a394dd0a5cab2d8303fd17e2
25+
- name: Validate template
26+
id: samlint
27+
run: sam validate --lint
28+
continue-on-error: true
29+
- name: Pass badge
30+
if: steps.samlint.outcome == 'success'
31+
run: |
32+
anybadge --label "SAM Lint" --value "Passing" --file samlint.svg Passing=green
33+
- name: Fail badge
34+
if: steps.samlint.outcome == 'failure'
35+
run: |
36+
anybadge --label "SAM Lint" --value "Failure" --file samlint.svg Failure=red
37+
- name: Run sam build
38+
id: sambuild
39+
run: sam build --parallel
40+
continue-on-error: true
41+
- name: Pass badge
42+
if: steps.sambuild.outcome == 'success'
43+
run: |
44+
anybadge --label "SAM Build" --value "Passing" --file sambuild.svg Passing=green
45+
- name: Fail badge
46+
if: steps.sambuild.outcome == 'failure'
47+
run: |
48+
anybadge --label "SAM Build" --value "Failure" --file sambuild.svg Failure=red
49+
- name: Verify Changed files
50+
uses: tj-actions/verify-changed-files@v20
51+
id: verify-changed-files
52+
with:
53+
files: |
54+
samlint.svg
55+
sambuild.svg
56+
- name: 'Commit files'
57+
if: steps.verify-changed-files.outputs.files_changed == 'true'
58+
run: |
59+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
60+
git config --local user.name "github-actions[bot]"
61+
git add samlint.svg sambuild.svg
62+
git commit -m "Updated CI badges" samlint.svg sambuild.svg
63+
- name: 'Push changes'
64+
if: steps.verify-changed-files.outputs.files_changed == 'true'
65+
uses: ad-m/github-push-action@master
66+
with:
67+
github_token: ${{ secrets.github_token }}
68+
branch: ${{ github.ref }}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# ThingPress: AWS IoT Certificate Multi-Account Registration Bulk Import
1+
# Thingpress
22

33
![Coverage](coverage.svg)
44
![pylint](linting.svg)
5+
![samlint](samlint.svg)
6+
![sambuild](sambuild.svg)
57

68
Thingpress is an AWS IoT administration tool. It provides customers who
79
design-in to their IoT devices a secure element or trusted platform module

src/bulk_importer/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from botocore.exceptions import ClientError
1616
from boto3 import client as boto3client
1717
from cryptography import x509
18-
from cryptography.x509.oid import NameOID
1918
from cryptography.hazmat.backends import default_backend
2019
from aws_lambda_powertools.utilities.typing import LambdaContext
2120
from aws_lambda_powertools.utilities.data_classes import SQSEvent

0 commit comments

Comments
 (0)