Chore: Adhere To Awesome Go Guidelines #1
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: Tests | |
on: | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- 'docs/**' | |
branches: | |
- master | |
- docs/refine-readme | |
jobs: | |
build: | |
name: Test Build All Containers | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Current Commit | |
uses: actions/checkout@v2 | |
- name: Run Build All | |
run: make test-build-all | |
- name: Notify To Slack If Failed | |
uses: lazy-actions/[email protected] | |
if: failure() | |
with: | |
type: ${{ job.status }} | |
job_name: "*[hex-monscape]* ${{ github.job }}" | |
mention: "here" | |
mention_if: "failure" | |
channel: "#solutions-team-ci-cd" | |
icon_emoji: ":haraaj:" | |
username: "ci/cd-reporter" | |
url: ${{ secrets.SOLUTIONS_TEAM_SLACK_WEBHOOK }} | |
commit: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
test-coverage: | |
name: Run Tests & Code Coverage | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Current Commit | |
uses: actions/checkout@v2 | |
- name: Run Automated Tests | |
run: make test | |
- name: Go Coverage Badge | |
uses: tj-actions/coverage-badge-go@v1 | |
with: | |
green: 80 | |
filename: coverage.out | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
id: auto-commit-action | |
with: | |
commit_message: Apply Code Coverage Badge | |
skip_fetch: true | |
skip_checkout: true | |
file_pattern: ./README.md | |
- name: Push Changes | |
if: steps.auto-commit-action.outputs.changes_detected == 'true' | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
- name: Notify To Slack If Failed | |
uses: lazy-actions/[email protected] | |
if: failure() | |
with: | |
type: ${{ job.status }} | |
job_name: "*[hex-monscape]* ${{ github.job }}" | |
mention: "here" | |
mention_if: "failure" | |
channel: "#solutions-team-ci-cd" | |
icon_emoji: ":haraaj:" | |
username: "ci/cd-reporter" | |
url: ${{ secrets.SOLUTIONS_TEAM_SLACK_WEBHOOK }} | |
commit: true | |
token: ${{ secrets.GITHUB_TOKEN }} |