Skip to content

Commit

Permalink
ci: add basic ci workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Jiawei Zhao <Phoenxi500526@163.com>
  • Loading branch information
Jiawei Zhao authored and Jiawei Zhao committed Jan 13, 2024
1 parent 75eec5a commit c5a3695
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI

on:
schedule:
- cron: '0 0 * * *'
pull_request:
branches: [dev]

jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod

- name: Format code
uses: iamnotaturtle/auto-gofmt@v2.1.0
with:
only_changed: True

lint:
name: Lint Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54.2

test:
name: Doris Operator Test
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod

- name: Run tests
run: make test

spell-check:
name: Spell Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Spelling Check
uses: crate-ci/typos@master

0 comments on commit c5a3695

Please sign in to comment.