-
Notifications
You must be signed in to change notification settings - Fork 4
69 lines (62 loc) · 2.13 KB
/
check.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
name: Check
on: [pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# lint by sh scripts
- name: End of File with Newline
run: ./cli-scripts/check_endoffile_with_newline.sh
# lint by node modules
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "yarn"
- name: Install Dependencies
run: yarn install --immutable
- name: Run ESLint
run: yarn run lint:eslint
- name: Run tsc
run: yarn run lint:tsc
- name: Run Prettier check
run: yarn run lint:prettier
- name: Run Markdownlint
run: yarn run lint:markdownlint
- name: Run Stylelint
run: yarn run lint:stylelint
- name: Run Markuplint
run: yarn run lint:markuplint --format GitHub
# lint by rubocop
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run Rubocop
run: bundle exec rubocop --format github
- name: Run Rubocop ERB
run: bundle exec rubocop --format github --config .rubocop-erb.yml
- name: Run ERB Lint
run: bundle exec erb_lint --lint-all
- name: Run Brakeman
run: bundle exec brakeman --no-pager --format github --run-all-checks
# lint by hadolint
- name: Run Hadolint for dev.Dockerfile
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: dev.Dockerfile
- name: Run Hadolint for fly.Dockerfile
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: fly.Dockerfile
# lint by docker build checks
- name: Run Docker Build Checks for dev.Dockerfile
# > 複数行における改行をスペースに変換する
# - ブロック最後の改行を削除
run: >-
docker build --build-arg RUBY_VERSION="$(cat .ruby-version)"
--check --file dev.Dockerfile .
- name: Run Docker Build Checks for fly.Dockerfile
run: >-
docker build --build-arg RUBY_VERSION="$(cat .ruby-version)"
--check --file fly.Dockerfile .