-
Notifications
You must be signed in to change notification settings - Fork 43
53 lines (44 loc) · 1.2 KB
/
ci.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
name: ci
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version-file: go.mod
cache: true
- name: ci/pre-init
run: |
make assets
echo "Checking if 'make assets' was ran after adding files..."
git diff --exit-code
- name: ci/verify
run: make verify-gomod
- name: Generate a dummy SSH key
id: gen-ssh-key
run: |
ssh-keygen -t ed25519 -f $GITHUB_WORKSPACE/sshkey -q -N ""
{
echo 'SSH_PRIVATE_KEY<<EOF'
cat $GITHUB_WORKSPACE/sshkey
echo EOF
} >> $GITHUB_OUTPUT
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ steps.gen-ssh-key.outputs.SSH_PRIVATE_KEY }}
- name: ci/check-style
run: make check-style
- name: ci/test
run: make test