-
Notifications
You must be signed in to change notification settings - Fork 0
124 lines (95 loc) · 2.59 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
name: Continuous Integration
on:
push:
branches: [main]
pull_request:
jobs:
java:
name: JDK ${{ matrix.java }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-latest]
java: [17]
distribution: [temurin]
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: ${{ matrix.distribution }}
cache: maven
- name: Build with Maven
run: |
mvn clean install --batch-mode --update-snapshots --show-version -DskipTests=true
terraform:
name: terraform
runs-on: ${{ matrix.os }}
permissions:
contents: read
pull-requests: write
strategy:
matrix:
os: [ubuntu-latest]
terraform: [1.3.6]
defaults:
run:
working-directory: infrastructure/terraform
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Setup Terraform ${{ matrix.terraform }}
uses: hashicorp/setup-terraform@v2
with:
terraform_version: $ {{ matrix.terraform }}
- name: TFLint cache plugin directory
uses: actions/cache@v3
with:
path: ~/.tflint.d/plugins
key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }}
- name: Setup TFLint
uses: terraform-linters/setup-tflint@v3
with:
tflint_version: latest
- name: Terraform fmt
run: terraform fmt -check
- name: Terraform validate
run: terraform validate -no-color
- name: Init TFLint
run: tflint --init
- name: Run TFLint
run: tflint -f compact
- name: Run tfsec PR commenter
uses: aquasecurity/[email protected]
with:
tfsec_version: latest
github_token: ${{ github.token }}
web:
name: web
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
defaults:
run:
working-directory: web
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Setup Node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: "npm"
cache-dependency-path: web/package-lock.json
- name: Install packages
run: npm ci
- name: Prettier
run: npm run fmt:check
- name: ESLint
run: npm run lint:fix