Skip to content

Commit 6b9b76d

Browse files
committed
github/workflows: add CI github action workflow
1 parent 341a4ff commit 6b9b76d

File tree

1 file changed

+102
-0
lines changed

1 file changed

+102
-0
lines changed

.github/workflows/ci.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
pull_request:
8+
branches:
9+
- '*'
10+
env:
11+
GOPATH: /tmp/go
12+
# Because some tests require explicit setting of GOPATH. TODO: FIX THEM.
13+
14+
jobs:
15+
build:
16+
name: ${{ matrix.os }} ${{ matrix.version }}
17+
runs-on: ${{ matrix.os }}
18+
19+
if: "!contains(github.event.head_commit.message, 'SKIP CI')"
20+
timeout-minutes: 20
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os: [ubuntu-latest]
25+
version: ['stable']
26+
27+
steps:
28+
- name: Clone repository
29+
uses: actions/checkout@v1
30+
31+
- name: Setup Node
32+
uses: actions/setup-node@v1
33+
with:
34+
node-version: '10.x'
35+
36+
- name: Setup Go
37+
uses: actions/setup-go@v1
38+
with:
39+
go-version: '1.14'
40+
41+
- name: Install dependencies
42+
run: npm install
43+
44+
- name: Compile
45+
run: npm run vscode:prepublish
46+
47+
- name: Install Go tools (Modules mode)
48+
run: |
49+
go version
50+
go get github.com/acroca/go-symbols \
51+
github.com/davidrjenni/reftools/cmd/fillstruct \
52+
github.com/haya14busa/goplay/cmd/goplay \
53+
github.com/mdempsky/gocode \
54+
github.com/sqs/goreturns \
55+
github.com/uudashr/gopkgs/v2/cmd/gopkgs \
56+
github.com/zmb3/gogetdoc \
57+
golang.org/x/lint/golint \
58+
golang.org/x/tools/cmd/gorename
59+
env:
60+
GO111MODULE: on
61+
62+
- name: Install Go tools (GOPATH mode)
63+
run: |
64+
go version
65+
go get github.com/cweill/gotests/... \
66+
github.com/rogpeppe/godef \
67+
github.com/ramya-rao-a/go-outline
68+
# Because some tests depend on the source code checked in GOPATH. TODO: FIX THEM.
69+
env:
70+
GO111MODULE: off
71+
72+
- name: Run unit tests
73+
run: npm run unit-test
74+
continue-on-error: true
75+
76+
- name: Run tests
77+
uses: GabrielBB/[email protected]
78+
with:
79+
run: npm run test
80+
env:
81+
CODE_VERSION: ${{ matrix.version }}
82+
continue-on-error: ${{ matrix.version == 'insiders' }}
83+
84+
eslint:
85+
runs-on: ubuntu-latest
86+
if: "!contains(github.event.head_commit.message, 'SKIP CI')"
87+
88+
steps:
89+
- name: Clone repository
90+
uses: actions/checkout@v1
91+
92+
- name: Setup Node
93+
uses: actions/setup-node@v1
94+
with:
95+
node-version: '10.x'
96+
97+
- name: Install Dependencies
98+
run: 'npm install --frozen-lockfile'
99+
shell: bash
100+
101+
- name: Lint check
102+
run: npm run lint

0 commit comments

Comments
 (0)