-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (39 loc) · 1.32 KB
/
test.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
# テストを実行する
name: Run tests
on: workflow_call
permissions:
contents: read
env:
AWS_CLIENT_VPN_CERTIFICATE_ARN: ${{ secrets.AWS_CLIENT_VPN_CERTIFICATE_ARN }}
USE_MOCK_DOCKER_IMAGE: "true"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: "infrastructure/package-lock.json"
- run: npm ci
working-directory: ./infrastructure
- name: Check format by Prettier
working-directory: ./infrastructure
run: npx prettier . --check
- name: Check by ESLint
working-directory: ./infrastructure
run: npx eslint .
- name: Run tests
working-directory: ./infrastructure
run: npm test
# 注意: 開発が進むとlib/constructに新しいtsファイルを追加することがある
# この場合は、lib/construct/*/*.tsを下記に追加すると良い
- name: Check docs
working-directory: ./infrastructure
run: |
npx typedoc --validation --treatWarningsAsErrors --treatValidationWarningsAsErrors \
lib/*.ts bin/*.ts
- name: Synthesize the CDK stack
working-directory: ./infrastructure
run: npx cdk synth