This repository has been archived by the owner on May 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
108 lines (86 loc) · 2.58 KB
/
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
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
name: Test Incoming Changes
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
TERM: xterm-color
CM_BIN: /usr/local/bin/checkmake
CM_URL_LINUX: https://github.com/mrtazz/checkmake/releases/download/0.2.2/checkmake-0.2.2.linux.amd64 # yamllint disable-line
jobs:
lint:
name: Run Linters and Vet
runs-on: ubuntu-latest
env:
SHELL: /bin/bash
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v5
with:
go-version: 1.21.7
- name: Disable default go problem matcher
run: echo "::remove-matcher owner=go::"
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Install yaml dependency
run: pip3 install pyyaml
env:
SHELL: /bin/bash
- name: Install checkmake
run: |
curl --location --output $CM_BIN --silent $CM_URL_LINUX
chmod +x $CM_BIN
- name: Install Shfmt
uses: mfinelli/setup-shfmt@v3
- name: Golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56
args: --timeout 10m0s
- name: Checkmake
run: checkmake --config=.checkmake Makefile
- name: Shfmt
run: shfmt -d scripts
- name: Markdownlint
uses: nosborn/[email protected]
with:
files: .
- name: ShellCheck
uses: ludeeus/action-shellcheck@master
- name: Typos
uses: crate-ci/typos@master
- name: Yamllint
uses: ibiqlik/action-yamllint@v3
with:
config_file: .yamllint.yml
file_or_dir: test/init-source-crs test/pgt-input
- name: Go vet
run: make vet
smoke-tests-local:
name: Run Local Smoke Tests
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v5
with:
go-version: 1.21.7
- name: Disable default go problem matcher
run: echo "::remove-matcher owner=go::"
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Install yaml dependency
run: pip3 install pyyaml
env:
SHELL: /bin/bash
- name: Build binary linux-amd64
run: make build-linux-amd64
- name: Build binary darwin-arm64
run: sudo make clean && make build-darwin-arm64
- name: Build local architecture and Basic test
run: sudo make clean && make test