Skip to content

Commit

Permalink
ci: restore ci pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotxx committed May 20, 2024
1 parent 94b43d6 commit 5f5b669
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 111 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Check
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
Test:
name: Unit Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19

- run: go build ./...
- run: go vet ./...

- name: Running go tests with coverage
env:
GO111MODULE: on
run: make cover
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out

GolangLint:
name: Golang Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.52.2

LicenseCheck:
name: License Check
runs-on: ubuntu-latest
env:
TERM: xterm
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: apache/skywalking-eyes@main
62 changes: 0 additions & 62 deletions .github/workflows/check.yaml.bak

This file was deleted.

File renamed without changes.
11 changes: 6 additions & 5 deletions .github/workflows/constraint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
github_token: ${{ github.token }} # Default: ${{ github.token }}
# Checks all Markdown files in repository for broken links.
# https://github.com/gaurav-nelson/github-action-markdown-link-check
# markdown-link-check:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: gaurav-nelson/github-action-markdown-link-check@v1
MarkdownLinkCheck:
name: Markdown Link Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gaurav-nelson/github-action-markdown-link-check@v1
88 changes: 44 additions & 44 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,58 +11,58 @@ on:
permissions:
contents: write
jobs:
# TODO: Remove the jobs temporarily, because it is almost over the free limit of Github Action
# Test:
# name: Unit Test
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Set up Go 1.19
# uses: actions/setup-go@v2
# with:
# go-version: 1.19
TODO: Remove the jobs temporarily, because it is almost over the free limit of Github Action
Test:
name: Unit Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19

# - run: go build ./...
# - run: go vet ./...
- run: go build ./...
- run: go vet ./...

# - name: Running go tests with coverage
# env:
# GO111MODULE: on
# run: make cover
- name: Running go tests with coverage
env:
GO111MODULE: on
run: make cover

# GolangLint:
# name: Golang Lint
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Set up Go 1.19
# uses: actions/setup-go@v2
# with:
# go-version: 1.19
# - name: golangci-lint
# uses: golangci/golangci-lint-action@v3
# with:
# # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
# version: v1.52.2
GolangLint:
name: Golang Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.52.2

# # Lints Pull Request commits with commitlint.
# #
# # Rules can be referenced:
# # https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional
# CommitLint:
# name: Commit Lint
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - uses: wagoid/commitlint-github-action@v5
CommitLint:
name: Commit Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5

# Release the artifacts, release note and images.
Release:
Expand Down

0 comments on commit 5f5b669

Please sign in to comment.