-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.24 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: c13n Main Pipeline
on:
pull_request:
branches:
- develop
jobs:
pull_request:
runs-on: ubuntu-latest
container:
image: ghcr.io/c13n-io/c13n-go-testenv:latest
options: -v ${{ github.workspace }}:/c13n
steps:
- name: Check branch naming
uses: deepakputhraya/action-branch-name@master
with:
regex: '([a-z])+\/([a-z][a-z-0-9]*[a-z0-9])'
allowed_prefixes: 'feat,fix,devops,bump'
ignore: develop
min_length: 5
max_length: 30
- name: Check out Git repository
uses: actions/checkout@v3
- name: Cache GO modules
uses: actions/cache@v3
id: cache-go-modules
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dev dependencies
run: cd /c13n && make dev-deps
- name: Lint
run: cd /c13n && make lint
- name: Lint Dockerfile
uses: hadolint/hadolint-action@master
with:
recursive: true
dockerfile: "Dockerfile"
- name: Test
run: cd /c13n && make test && make clean