-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (112 loc) · 3.52 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
name: CI pipeline
on: ['push']
jobs:
menu-scraper-lib-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.9'
- name: Install dependencies
working-directory: ./menu-scraper-lib
run: go get -d ./...
- name: Run tests
working-directory: ./menu-scraper-lib
run: go test -v ./test
- name: Check if code is formatted using go fmt
if: '!cancelled()'
working-directory: ./menu-scraper-lib
run: test -z $(gofmt -l .)
- name: Lint code
if: '!cancelled()'
uses: golangci/golangci-lint-action@v6
with:
working-directory: ./menu-scraper-lib
version: v1.58.1
menu-scraper-lambda-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.9'
- name: Install dependencies
working-directory: ./menu-scraper-lambda
run: go get -d ./...
- name: Build
working-directory: ./menu-scraper-lambda
run: go build ./bin/main.go
- name: Check if code is formatted using go fmt
if: '!cancelled()'
working-directory: ./menu-scraper-lambda
run: test -z $(gofmt -l .)
- name: Lint code
if: '!cancelled()'
uses: golangci/golangci-lint-action@v6
with:
working-directory: ./menu-scraper-lambda
version: v1.58.1
alexa-skill-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: './alexa-skill/lambda-pdm/pyproject.toml'
- name: Install PDM
run: pip install pdm
- name: Install dependencies
working-directory: ./alexa-skill/lambda-pdm
run: pdm install
- name: Run tests
working-directory: ./alexa-skill/lambda-pdm
run: pdm run test
- name: Lint code
if: '!cancelled()'
working-directory: ./alexa-skill/lambda-pdm
run: pdm run lint
- name: Check if code is formatted using ruff
if: '!cancelled()'
working-directory: ./alexa-skill/lambda-pdm
run: pdm run check-format
- name: Check typing
if: '!cancelled()'
working-directory: ./alexa-skill/lambda-pdm
run: pdm run typecheck
sam-app-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup SAM
uses: aws-actions/setup-sam@v2
with:
use-installer: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Verify configuration
working-directory: ./sam-app
run: sam validate
- name: Build
working-directory: ./sam-app
run: sam build --use-container
- name: Integration test
working-directory: ./sam-app
run: ./performLocalIntegrationTest.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: sam-integration-testing-artifacts
path: sam-app/testing_artifacts
verify-architecture-diagram:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Recompute architecture diagram
working-directory: ./docs/architecture
run: ./buildSvg.sh
- name: Check if architecture diagram is up to date
run: git add --all && git diff --exit-code --stat HEAD --