Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Separate master and PR workflows #11

Merged
merged 1 commit into from
Dec 19, 2022
Merged
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: 1 addition & 4 deletions .github/workflows/main.yml → .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
---
name: Main Workflow
name: Master Workflow
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-20.04
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Pull Request Workflow
on:
pull_request:
branches:
- master
jobs:
test:
Adibov marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.19.2'
- name: Test
run: go test ./... -v -coverprofile=coverage.txt -covermode count
build:
Adibov marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.19.2'
- name: Build
run: go build -o semangit .
- name: Smoke test
run: ./semangit --help
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Semangit
[![Main Workflow](https://github.com/emranprojects/semangit/actions/workflows/main.yml/badge.svg)](https://github.com/emranprojects/semangit/actions/workflows/main.yml)
[![Master Workflow](https://github.com/emranprojects/semangit/actions/workflows/master.yml/badge.svg)](https://github.com/emranprojects/semangit/actions/workflows/master.yml)
![Test Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/emranbm/03d07927044bdfe73aee59e6193dd8d5/raw/badge-coverage-semangit.json)
A simple tool to force version update in CI.
We've all experienced commits forgetting to update the corresponding version on the codebase; like changing a helm chart template without increasing the `version` in `Chart.yaml`. *Semangit* helps to prevent such mistakes by checking whether a change needs a corresponding version increase.
Expand Down