CI && linters cfg #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: Go CI | |
| on: | |
| pull_request: | |
| branches: [develop, master] | |
| push: | |
| branches: [develop, master] | |
| jobs: | |
| build-linux: | |
| name: Build stringFormatter on linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Set up Go | |
| uses: actions/[email protected] | |
| with: | |
| go-version: '1.21' | |
| - name: Build | |
| run: go version && go build -v ./... | |
| build-windows: | |
| name: Build stringFormatter on windows | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Set up Go | |
| uses: actions/[email protected] | |
| with: | |
| go-version: '1.21' | |
| - name: Build | |
| run: go version && go build -v ./... | |
| all-tests-linux: | |
| name: Run all tests on linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Set up Go | |
| uses: actions/[email protected] | |
| with: | |
| go-version: '1.21' | |
| - name: Test all | |
| run: go version && go mod tidy && go test -v ./... | |
| #all-tests-windows: | |
| # name: Run all tests on windows | |
| # runs-on: windows-latest | |
| # steps: | |
| # - uses: actions/[email protected] | |
| # - name: Set up Go | |
| # uses: actions/[email protected] | |
| # - name: Test all | |
| # run: go test -v ./... | |
| # on windows don't work linux containers by default | |
| lint: | |
| name: Run golangci linters | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Set up Go | |
| uses: actions/[email protected] | |
| with: | |
| go-version: '1.21' | |
| - name: Run golangci-lint | |
| uses: golangci/[email protected] | |
| with: | |
| version: v1.63.4 | |
| args: --timeout 3m --config .golangci.yaml |