fix: download openGemini package if not exist #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [ opened, synchronize, reopened, ready_for_review ] | |
paths-ignore: | |
- 'docs/**' | |
- 'scripts/**' | |
- '**.md' | |
- '.gitignore' | |
env: | |
GO111MODULE: on | |
GONOSUMDB: "*" | |
GOSUMDB: off | |
jobs: | |
CommitLint: | |
name: commit lint | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 100 | |
- name: Run commitlint | |
uses: wagoid/commitlint-github-action@v5 | |
StaticCheck: | |
name: "static check" | |
needs: CommitLint | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
fetch-depth: 1 | |
- uses: WillAbides/setup-go-faster@v1.7.0 | |
with: | |
go-version: "1.19" | |
- name: Run static check | |
run: make static-check | |
OtherGoLint: | |
name: "style check, go vet and other go lint" | |
needs: CommitLint | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
fetch-depth: 1 | |
- uses: WillAbides/setup-go-faster@v1.7.0 | |
with: | |
go-version: "1.18" | |
- name: Run go version check | |
run: make go-version-check | |
- name: Run go generate check | |
run: make go-generate | |
- name: Run style check | |
run: make style-check | |
- name: Run go vet check | |
run: make go-vet-check | |
# - name: Run golangci-lint ## TODO: use github-action below | |
# run: make golangci-lint-check | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v3.6.0 | |
with: | |
version: v1.53 | |
# args: --timeout=10m --tests=false --skip-dirs=open_src | |
args: --timeout=10m --tests=false | |
only-new-issues: true | |
skip-pkg-cache: true | |
skip-build-cache: true | |
UT: | |
name: unit test | |
if: github.event.pull_request.draft == false | |
needs: [StaticCheck, OtherGoLint] | |
strategy: | |
fail-fast: true | |
matrix: | |
os: ["ubuntu-latest"] # "macOS-latest" | |
go: ["1.18.x"] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- uses: WillAbides/setup-go-faster@v1.7.0 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Run gotest | |
run: | | |
go mod tidy | |
make gotest | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |