-
Notifications
You must be signed in to change notification settings - Fork 41
82 lines (78 loc) · 2.16 KB
/
ci.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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '0 17 * * *'
jobs:
shell-ci:
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- name: Lint shell scripts, ignoring third-party files
run: |
find . -name "*.sh" | grep -v site | grep -v vendor | grep -v node_modules | grep -v demo/demo-magic > shell_files.out
shellcheck $(cat shell_files.out)
node-ci:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
node-version: [12.x, 14.x]
package: [kpt-functions, create-kpt-functions, init-package, hello-world, demo-functions]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install and test NPM packages
run: |
cd ts/${{ matrix.package }}
npm ci
npm test
- name: Check licenses
if: matrix.package == 'kpt-functions' ||
matrix.package == 'create-kpt-functions' ||
matrix.package == 'demo-functions'
run: |
cd ts/${{ matrix.package }}
npm run lint-license
- name: Generate docs diff
if: matrix.package == 'kpt-functions'
run: |
cd ts/${{ matrix.package }}
npm run gen-docs
DIFF=$(git status -s)
[[ -z $DIFF ]] || { echo "Need to update docs: $DIFF"; }
go-ci:
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
env:
GOPATH: /home/runner/work/kpt-functions-sdk/go
GO111MODULE: on
steps:
- name: Set up Go 1.18
uses: actions/setup-go@v1
with:
go-version: 1.18
id: go
- name: Check out code into GOPATH
uses: actions/checkout@v1
with:
path: go/src/github.com/GoogleContainerTools/kpt-functions-sdk
- name: Build, Test, Lint
run: hack/ci-validate-go.sh
- name: Test typegen
run: |
cd ts/typegen
make all