-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (57 loc) · 1.42 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: write
pull-requests: read
checks: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
cache: 'pip'
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: lint Python code
run: |
ruff check .
- name: run tests with coverage
run: |
coverage run -m unittest discover tests
- name: generate coverage report
run: |
coverage report -m
- name: validate AWS SAM template
run: |
sam validate --lint
- name: lint CloudFormation templates
run: |
cfn-lint cloudformation/*
release:
needs: [test]
if: ${{ github.event_name != 'pull_request' }}
concurrency: release
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: python-semantic-release/python-semantic-release@v9
id: release
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
changelog: false
push: true
git_committer_name: "github-actions"
git_committer_email: "[email protected]"