chore(deps): bump actions/checkout from 4.2.1 to 4.2.2 (#62) #163
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 | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
concurrency: | |
group: CI-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version-file: go.mod | |
cache: true | |
- name: Build | |
run: go build -v ./... | |
lint: | |
name: Lint | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version-file: go.mod | |
cache: true | |
- name: Lint | |
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 | |
with: | |
version: v1.61 | |
unit-test: | |
name: Unit Test | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version-file: go.mod | |
cache: true | |
- name: Test | |
run: go test -v -covermode=atomic -coverprofile=coverage.out ./... | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.out | |
verbose: true | |
integration-test: | |
name: Integration Test | |
needs: [lint, unit-test] | |
runs-on: ubuntu-latest | |
services: | |
backstage: | |
image: roadiehq/community-backstage-image | |
ports: | |
- 7000 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version-file: go.mod | |
cache: true | |
- name: Run entities example | |
env: | |
BACKSTAGE_BASE_URL: http://localhost:${{ job.services.backstage.ports[7000] }}/api | |
run: | | |
sleep 30 | |
go run ./examples/entities/main.go | |
- name: Run locations example | |
env: | |
BACKSTAGE_BASE_URL: http://localhost:${{ job.services.backstage.ports[7000] }}/api | |
run: | | |
sleep 30 | |
go run ./examples/locations/main.go |