generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 21
74 lines (63 loc) · 1.96 KB
/
build.yml
File metadata and controls
74 lines (63 loc) · 1.96 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build Python Services
on:
push:
branches: [develop, main]
paths:
- 'unicorn_contracts/**'
- 'unicorn_approvals/**'
- 'unicorn_web/**'
pull_request:
branches: [develop, main]
paths:
- 'unicorn_contracts/**'
- 'unicorn_approvals/**'
- 'unicorn_web/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
service: [unicorn_contracts, unicorn_approvals, unicorn_web]
include:
- service: unicorn_contracts
display_name: Unicorn Contracts Service
- service: unicorn_approvals
display_name: Unicorn Approvals Service
- service: unicorn_web
display_name: Unicorn Web Service
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: 3.13
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: 0.7.8
- name: Install AWS SAM CLI
uses: aws-actions/setup-sam@v2
- name: Install cfn-lint and plugins
run: |
pip install cfn-lint
pip install cfn-lint-serverless
- name: Install yq
run: |
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod a+x /usr/local/bin/yq
- name: Build ${{ matrix.display_name }}
run: make build
working-directory: ./${{ matrix.service }}
env:
DOCKER_OPTS: --use-container
- name: Upload build artifacts for ${{ matrix.display_name }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.service }}-build-artifacts
path: ${{ matrix.service }}/.aws-sam/
retention-days: 7
- name: Clean up ${{ matrix.display_name }}
run: make clean
working-directory: ./${{ matrix.service }}
if: always()