Bump github.com/go-co-op/gocron from 1.27.1 to 1.32.1 #96
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: Go with Confidence | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
unit-test: | |
name: Unit Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 1.x | |
- name: Cache Go modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- run: go mod download | |
- run: make unit-test | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: unit-test-coverage | |
path: unit-test-coverage.out | |
api-test: | |
name: API Test | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_USER: my_user | |
POSTGRES_PASSWORD: my_password | |
POSTGRES_DB: my_db | |
ports: | |
- 54321:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
redis: | |
image: redis:latest | |
ports: | |
- 63791:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 1.x | |
- name: Cache Go modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- run: go mod download | |
- run: go run main.go migrate --config=config/config.testing.yaml | |
- run: make api-test | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: api-test-coverage | |
path: api-test-coverage.out | |
sonarqube-analysis: | |
name: SonarQube Analysis | |
needs: [unit-test, api-test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: unit-test-coverage | |
path: . | |
- uses: actions/download-artifact@v3 | |
with: | |
name: api-test-coverage | |
path: . | |
- uses: sonarsource/sonarqube-scan-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |