-
Notifications
You must be signed in to change notification settings - Fork 21
67 lines (55 loc) · 1.77 KB
/
code.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
name: code
on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
go:
permissions:
contents: read # fetch code
pull-requests: read # fetch pull requests
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.22
- name: Testing
run: go test -timeout 30s -v ./...
- name: Linting
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: v1.61.0
# Inherits workflow permissions.
python:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Linting
uses: psf/black@1b2427a2b785cc4aac97c19bb4b9a0de063f9547 # v24.10.0
with:
# This recursively scans the entire project. Note that `exclude` must be
# an empty string: "An empty value means no paths are excluded."
options: "--check --exclude=''"
# Inherits workflow permissions.
jsonnet:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.22
- name: Compiling
run: |
go install github.com/google/go-jsonnet/cmd/jsonnet@v0.20.0
sh .github/workflows/code_jsonnet.sh