-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (95 loc) · 2.9 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
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
---
name: Test
"on":
push:
branches: main
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: npm
- uses: actions/setup-python@v4
with:
cache: pipenv
- run: |
npm ci
python -m pip install --upgrade pip
python -m pip install pipenv
python -m pipenv sync --dev
- name: "Lint: credentials"
run: npx secretlint "**/*"
- name: "Lint: text (prose)"
uses: errata-ai/vale-action@v2
with:
files: >
["README.md", "docs/CONTRIBUTING.md", "docs/SECURITY.md",
".github/PULL_REQUEST_TEMPLATE.md", ".github/ISSUE_TEMPLATE"]
reporter: github-check
fail_on_error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Lint: npm"
run: npm run lint
- name: "Lint: Git commit message"
# Skip commitlint if a commit is created by Dependabot.
# Because a line length of a commit message created by Dependabot often
# exceeds 100 characters.
if: github.actor != 'dependabot[bot]'
uses: wagoid/commitlint-github-action@v5
with:
configFile: .commitlintrc.yml
- name: "Lint: YAML"
uses: karancode/yamllint-github-action@v2.1.1
with:
yamllint_strict: true
- name: "Lint: shell script"
uses: ludeeus/action-shellcheck@master
with:
ignore_paths: .husky/_ node_modules
- name: "Lint: GitHub Actions workflow"
# yamllint disable rule:line-length
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color
# yamllint enable rule:line-length
shell: bash
- name: "Lint: Python"
run: python -m pipenv run lint
# yamllint disable rule:comments-indentation
# If this is an npm project and package.json has build or test script,
# uncomment the following jobs.
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
cache: pipenv
- run: |
python -m pip install --upgrade pip
python -m pip install pipenv
python -m pipenv sync --dev
- run: bin/build.sh
# test:
# name: Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# cache: pipenv
# - run: |
# python -m pip install --upgrade pip
# python -m pip install pipenv
# python -m pipenv sync --dev
# - run: python -m pipenv test
# yamllint enable rule:comments-indentation