chore: bump ruby/setup-ruby from 1.199.0 to 1.202.0 #78
Workflow file for this run
This file contains 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: CI/CD Pipeline | |
on: | |
push: | |
branches-ignore: | |
- 'dependabot/**' | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.cff' | |
pull_request: | |
branches: | |
- '**' | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.cff' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: read-all | |
jobs: | |
get-go-versions: | |
name: Get Go Versions | |
runs-on: ubuntu-latest | |
outputs: | |
version-matrix: ${{ steps.get-language-versions.outputs.latest-versions }} | |
steps: | |
- name: Get Required Versions | |
uses: ActionsToolbox/get-language-versions-action@446919617fd774095b5dd3ed71c39dd3fd0d8f4f # v0.1.3 | |
id: get-language-versions | |
with: | |
language: "go" | |
remove-patch-version: true | |
max-versions: 3 | |
go-build: | |
name: Build Go Code | |
needs: get-go-versions | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
go-versions: ${{ fromJson(needs.get-go-versions.outputs.version-matrix) }} | |
steps: | |
- name: Checkout the Repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Go | |
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
with: | |
go-version: ${{ matrix.go-versions }} | |
- name: Check code formatting | |
run: | | |
gofmt -l . | |
FILES=$(gofmt -l .) | |
if [ -n "$FILES" ]; then | |
echo "The following files are not formatted correctly:" | |
echo "$FILES" | |
exit 1 | |
fi | |
- name: Run Go Vet | |
run: go vet ./src | |
- name: Install staticcheck | |
run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
- name: Run staticcheck | |
run: staticcheck ./src/... | |
- name: Install errcheck | |
run: go install github.com/kisielk/errcheck@latest | |
- name: Run errcheck | |
run: errcheck ./src/... | |
- name: Install golint | |
run: go install golang.org/x/lint/golint@latest | |
- name: Run golint | |
run: golint ./src/... | |
- name: Run Go Build | |
run: go build -o bin/guessing-game ./src | |
shellcheck: | |
name: ShellCheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the Repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Perform ShellCheck Analysis | |
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/shellcheck/master/pipeline.sh) | |
cicd-pipeline: | |
if: always() | |
name: CI/CD Pipeline | |
needs: | |
- go-build | |
- shellcheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the Repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Check Job Statuses | |
run: .github/scripts/check-jobs.sh '${{ toJson(needs) }}' |