Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/dependabot-auto-merge.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Dependabot auto-merge
on: pull_request
on:
check_suite:
types:
- completed

permissions:
contents: write
Expand Down
56 changes: 42 additions & 14 deletions .github/workflows/golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
name: Go

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
branches: [ main ]

env:
GO_MODULE: github.com/finleap-connect/backup-operator
Expand All @@ -45,22 +43,52 @@ jobs:
needs: lint
runs-on: ubuntu-latest
steps:
- name: Install Go
- name: Checkout Project
uses: actions/checkout@v3
with:
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout Project
uses: actions/checkout@v3
- name: test

- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Run Test
run: |
make test
make coverage
- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1.0.9

- name: Go Coverage Badge
uses: tj-actions/coverage-badge-go@v1.2
with:
filename: .coverprofile

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v9.1
id: verify-changed-files
with:
infile: .coverprofile
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@1.1.3
files: README.md

- name: Commit changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "chore: Updated coverage badge."

- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
github_token: ${{ github.token }}
branch: ${{ github.head_ref }}
13 changes: 13 additions & 0 deletions .github/workflows/greetings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Greetings

on: [pull_request_target, issues]

jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Thanks for reporting this issue, don't forget to star this project to help us reach a wider audience."
pr-message: "Thanks for implementing a fix, could you ensure that the test covers your changes."
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Backup Operator

![Coverage](https://img.shields.io/badge/Coverage-1-red)
[![Build status](https://github.com/finleap-connect/backup-operator/actions/workflows/golang.yaml/badge.svg)](https://github.com/finleap-connect/backup-operator/actions/workflows/golang.yaml)
[![Coverage Status](https://coveralls.io/repos/github/finleap-connect/backup-operator/badge.svg?branch=main)](https://coveralls.io/github/finleap-connect/backup-operator?branch=main)
[![Go Report Card](https://goreportcard.com/badge/github.com/finleap-connect/backup-operator)](https://goreportcard.com/report/github.com/finleap-connect/backup-operator)
[![Go Reference](https://pkg.go.dev/badge/github.com/finleap-connect/backup-operator.svg)](https://pkg.go.dev/github.com/finleap-connect/backup-operator)
[![GitHub release](https://img.shields.io/github/release/finleap-connect/backup-operator.svg)](https://github.com/finleap-connect/backup-operator/releases)
Expand Down