fix: address code review findings and enhance code quality #88
Workflow file for this run
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
| # .github/workflows/go.yml | |
| name: Go Build and Test Workflow | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| GO_VERSION: 1.20.x | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go ${{ env.GO_VERSION }} | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Compile | |
| run: go mod download && go mod tidy -v -x -e && go build -v ./... && chmod a+rx ./gh-commit && ./gh-commit | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go ${{ env.GO_VERSION }} | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Get dependencies | |
| run: go mod download | |
| - name: Run tests | |
| run: go test -v ./... | |
| - name: Install | |
| run: gh extension install ghcli/gh-commit-src && gh commit-src |