Skip to content

Fixes handler::checkForChanges diff::NEW #62

Fixes handler::checkForChanges diff::NEW

Fixes handler::checkForChanges diff::NEW #62

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.22.4
uses: actions/setup-go@v5
with:
go-version: '1.22.4'
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: 6.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
SWITCHER_API_URL: ${{ secrets.SWITCHER_API_URL }}
SWITCHER_API_JWT_SECRET: ${{ secrets.SWITCHER_API_JWT_SECRET }}
API_DOMAIN_ID: ${{ secrets.API_DOMAIN_ID }}
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 }}