add GitHub Actions CI configuration and update test command #1
This file contains hidden or 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: Golang CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build-on-ubuntu2204: | |
| strategy: | |
| matrix: | |
| os: [ darwin, windows, linux ] | |
| arch: [amd64, arm64] | |
| runs-on: ubuntu-22.04 | |
| name: build on ${{ matrix.os }} ${{ matrix.arch }} | |
| steps: | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.1' | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| fetch-depth: 0 | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v6 | |
| with: | |
| args: --disable-all -E errcheck -E staticcheck | |
| skip-cache: true | |
| problem-matchers: true | |
| - name: Test (go test) | |
| run: | | |
| make clean | |
| TARGET_OS=${{ matrix.os }} TARGET_ARCH=${{ matrix.arch }} make env | |
| TARGET_OS=${{ matrix.os }} TARGET_ARCH=${{ matrix.arch }} make test | |
| - name: Golang Build | |
| run: | | |
| make clean | |
| TARGET_OS=${{ matrix.os }} TARGET_ARCH=${{ matrix.arch }} make env | |
| TARGET_OS=${{ matrix.os }} TARGET_ARCH=${{ matrix.arch }} make build |