Skip to content

Fixed snapshot version/content check before push to repo (#33) #85

Fixed snapshot version/content check before push to repo (#33)

Fixed snapshot version/content check before push to repo (#33) #85

Workflow file for this run

name: Master CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build-test:
name: Build & Test
runs-on: ubuntu-latest
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go 1.23.0
uses: actions/setup-go@v5
with:
go-version: '1.23.0'
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: 7.0
- name: Build
run: go build -v ./...
- name: Test
run: go test -p 1 -v ./... -coverprofile="coverage.out"
env:
GO_ENV: test
MONGODB_URI: mongodb://127.0.0.1:27017
MONGO_DB: switcher-gitops-test
GIT_TOKEN_PRIVATE_KEY: ${{ secrets.GIT_TOKEN_PRIVATE_KEY }}
GIT_USER: ${{ secrets.GIT_USER }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
GIT_TOKEN_READ_ONLY: ${{ secrets.GIT_TOKEN_READ_ONLY }}
GIT_REPO_URL: ${{ secrets.GIT_REPO_URL }}
GIT_BRANCH: ${{ secrets.GIT_BRANCH }}
- name: SonarCloud Scan
uses: sonarsource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}