Debian Codegraph @

.github/workflows/ci.yml

raw symbols SCIP
1 name: ci-pipeline
2
3 on:
4 push:
5 branches: [ "*" ]
6 pull_request:
7 branches: [ "*" ]
8
9 jobs:
10
11 ci:
12 runs-on: ubuntu-latest
13 strategy:
14 matrix:
15 go: [ '', '1.x' ] # '' uses go.mod, 1.x uses latest go
16 steps:
17 - uses: actions/checkout@v2
18 with:
19 path: src/sigs.k8s.io/json/
20
21 - name: Set up Go
22 uses: actions/setup-go@v3
23 with:
24 go-version-file: 'src/sigs.k8s.io/json/go.mod'
25 go-version: ${{ matrix.go }}
26 check-latest: true
27
28 - name: Test
29 run: |
30 cd ${GITHUB_WORKSPACE}/src/sigs.k8s.io/json/
31 make test
32 - name: Benchmark
33 run: |
34 cd ${GITHUB_WORKSPACE}/src/sigs.k8s.io/json/
35 make benchmark
36 - name: Vet
37 run: |
38 cd ${GITHUB_WORKSPACE}/src/sigs.k8s.io/json/
39 make vet
40 - name: fmt
41 run: |
42 cd ${GITHUB_WORKSPACE}/src/sigs.k8s.io/json/
43 make fmt
44 git diff --exit-code
45
46 apidiff:
47 runs-on: ubuntu-latest
48 if: github.base_ref
49 steps:
50 - name: Checkout old code
51 uses: actions/checkout@v2
52 with:
53 ref: ${{ github.base_ref }}
54 path: "old"
55 - name: Checkout new code
56 uses: actions/checkout@v2
57 with:
58 path: "new"
59 - name: Install Go
60 uses: actions/setup-go@v3
61 with:
62 go-version-file: 'new/go.mod'
63 - name: Add GOBIN to PATH
64 run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
65 - name: Install dependencies
66 run: go install golang.org/x/exp/cmd/apidiff@latest
67 - name: APIDiff
68 run: ./hack/verify-apidiff.sh -d ../old
69 working-directory: "new"
70
71