-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.34 KB
/
lint-and-test.yaml
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
name: Lint and Test
on:
pull_request:
types: [opened, synchronize]
# Disable permissions for all available scopes
permissions: {}
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
checks: write # not required (see slack) but produces an error in the logs
# https://trunkcommunity.slack.com/archives/C04GAE5EA5S/p1677846825881319?thread_ts=1676214812.584879&cid=C04GAE5EA5S
timeout-minutes: 20
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
persist-credentials: true # lint fails to authenticate when false
- name: Lint with trunk
uses: trunk-io/trunk-action@da67635060feab46c164bc130690e61864a5d13b # v1.1.13
- name: Dependency Review
uses: actions/dependency-review-action@4901385134134e04cec5fbe5ddfe3b2c5bd5d976 # v4.0.0
test:
# Job name should be the same as the called workflow name for required status
# check to match. In this case job level `name: Test` matches workflow level
# `name: Test` in hugo.yaml
name: Test
needs: [lint]
uses: 3ware/www-src/.github/workflows/hugo.yaml@2e5314429b97aecc4354ba42a5ba0fb0c287b1ec # v2.0.0