You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2021/05/31 04:20:18 UTC

[apisix-go-plugin-runner] branch ci created (now a0e72cc)

This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a change to branch ci
in repository https://gitbox.apache.org/repos/asf/apisix-go-plugin-runner.git.


      at a0e72cc  ci: enable

This branch includes the following new commits:

     new a0e72cc  ci: enable

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[apisix-go-plugin-runner] 01/01: ci: enable

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch ci
in repository https://gitbox.apache.org/repos/asf/apisix-go-plugin-runner.git

commit a0e72cc482ddbeb4ee86c6097064ad7d5fbed8dc
Author: spacewander <sp...@gmail.com>
AuthorDate: Mon May 31 12:19:58 2021 +0800

    ci: enable
---
 .github/workflows/license-checker.yml | 38 ++++++++++++++++++++++++
 .github/workflows/lint.yml            | 55 +++++++++++++++++++++++++++++++++++
 .github/workflows/spell-checker.yml   | 37 +++++++++++++++++++++++
 .github/workflows/unit-test-ci.yml    | 42 ++++++++++++++++++++++++++
 Makefile                              |  2 +-
 5 files changed, 173 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/license-checker.yml b/.github/workflows/license-checker.yml
new file mode 100644
index 0000000..586c7a9
--- /dev/null
+++ b/.github/workflows/license-checker.yml
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+name: License checker
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  check-license:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v2
+      - name: Check License Header
+        uses: apache/skywalking-eyes@v0.1.0
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 0000000..7872fd7
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,55 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+name: lint
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  golang-lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: setup go
+        uses: actions/setup-go@v1
+        with:
+          go-version: '1.15'
+
+      - name: Download golangci-lint
+        run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.39.0
+
+      - name: golangci-lint
+        run: |
+          export PATH=$PATH:$(go env GOPATH)/bin/
+          make lint
+
+      - name: run gofmt
+        working-directory: ./
+        run: |
+          diffs=`gofmt -l .`
+          if [[ -n $diffs ]]; then
+              echo "Files are not formatted by gofmt:"
+              echo $diffs
+              exit 1
+          fi
diff --git a/.github/workflows/spell-checker.yml b/.github/workflows/spell-checker.yml
new file mode 100644
index 0000000..b31a48c
--- /dev/null
+++ b/.github/workflows/spell-checker.yml
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+name: spell-checker
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+jobs:
+  misspell:
+    name: runner / misspell
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out code.
+        uses: actions/checkout@v1
+      - name: Install
+        run: |
+          wget -O - -q https://git.io/misspell | sh -s -- -b .
+      - name: Misspell
+        run: |
+          find . -name "*.go" -or -name "*.md" -or -name "*.yml" -type f | xargs ./misspell -error
diff --git a/.github/workflows/unit-test-ci.yml b/.github/workflows/unit-test-ci.yml
new file mode 100644
index 0000000..b88bdf7
--- /dev/null
+++ b/.github/workflows/unit-test-ci.yml
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+name: unit-test-ci
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+jobs:
+  run-test:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - name: setup go
+      uses: actions/setup-go@v1
+      with:
+        go-version: '1.15'
+    - name: run unit test
+      run: |
+        make test
+    - name: upload coverage profile
+      run: |
+        bash <(curl -s https://codecov.io/bash)
diff --git a/Makefile b/Makefile
index 1f124cb..465326e 100644
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@ build:
 
 .PHONY: lint
 lint:
-	golangci-lint run --verbose
+	golangci-lint run --verbose ./...
 
 .PHONY: test
 test: