Lädt...


🔧 actions-hottest🚀: GitHub Actions for Commenting on Golang Unit Test Results in Pull Requests


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Make the test results more user-friendly

I previously introduced a feature in the go-spectest/spectest, which extracts error messages from Golang unit test results.

I have now separated that functionality into the nao1215/hottest command.

The 'hottest' command can use the same options as 'go test':

demo

hottest on GitHub Actions

Many people run unit tests using GitHub Actions. Therefore, I created nao1215/actions-hottest to make it easy to execute 'hottest' in GitHub Actions.

Here is an example workflow for running unit tests using 'hottest':

name: SampleTest

on:
  push:

jobs:
  sample_test:
    name: sample test

    strategy:
      matrix:
        platform: [ubuntu-latest]

    runs-on: ${{ matrix.platform }}

    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-go@v4
        with:
          go-version: "1"
          check-latest: true

      - uses: nao1215/actions-hottest@v1
        with:
          # This argument is same as `go test` command.
          args: '-cover -coverpkg=./... -coverprofile=coverage.out ./...'

Here are the logs for when the unit tests succeed and when they fail:

  • when all test pass
    all-test-pass

  • when some test fails
    test-fail

Comments Test Results in Pull Request

I find it inconvenient to check the workflow logs when tests fail. Therefore, I have decided to have 'hottest' leave the test results as comments in the Pull Request.

Here are the comments for when the unit tests succeed and when they fail:

  • when all test pass
    all-test-pass

  • when some test fails
    test-fail

Conclusion

'hottest' is a command that extracts error messages from failed unit tests. You can easily adopt GitHub Actions. Its usage is similar to 'go test,' and there is no need to rewrite the test code.

lease do give 'hottest' a try!! Additionally, your support in the form of a GitHub star would be encouraging for further development.

...

🔧 Pull together GitHub Issues and Pull Requests Across Repositories to GitHub Projects Automatically


📈 54.59 Punkte
🔧 Programmierung

🔧 Enhance Code Security with GitHub Actions: Automatically Commenting PRs with Docker Scans


📈 41.77 Punkte
🔧 Programmierung

📰 Visual Studio Code 1.51 setzt Arbeit an GitHub Pull Requests and Issues fort


📈 33.18 Punkte
📰 IT Nachrichten

📰 Visual Studio Code 1.51 setzt Arbeit an GitHub Pull Requests and Issues fort


📈 33.18 Punkte
📰 IT Nachrichten

🔧 Working with Pull Requests in Visual Studio Code and GitHub


📈 33.18 Punkte
🔧 Programmierung

📰 Mit GitHub Enterprise Server 2.21 Pull Requests in Drafts umwandeln


📈 33.18 Punkte
📰 IT Nachrichten

🔧 Automate Github Pull Requests With NodeJS API


📈 33.18 Punkte
🔧 Programmierung

📰 GitHub Mobile 1.2 überarbeitet den Review-Prozess bei Pull Requests


📈 33.18 Punkte
📰 IT Nachrichten

🐧 One of the most colorful github pull requests


📈 33.18 Punkte
🐧 Linux Tipps

🔧 Introducing GitHub Pull Requests for Visual Studio Code


📈 33.18 Punkte
🔧 Programmierung

📰 Git your patches here! GitHub offers to brew automatic pull requests loaded with vuln fixes


📈 33.18 Punkte
📰 IT Security Nachrichten

🪟 Brave browser AI assistant Leo can now generate summaries for GitHub pull requests


📈 33.18 Punkte
🪟 Windows Tipps

🔧 Introducing GitHub Pull Requests for Visual Studio Code


📈 33.18 Punkte
🔧 Programmierung

🔧 AI-Powered Pull Requests: CodiumAI vs GitHub Copilot


📈 33.18 Punkte
🔧 Programmierung

🔧 GitHub Pull Requests for VS Code


📈 33.18 Punkte
🔧 Programmierung

🔧 Unveiling CodiumAI PR-Agent: A Comparative Analysis Against GitHub Copilot for Pull Requests


📈 33.18 Punkte
🔧 Programmierung

📰 GitHub führt Reaktionen auf Pull Requests, Issues und Kommentare ein


📈 33.18 Punkte
📰 IT Nachrichten

🎥 The power of GitHub Copilot Chat for pull requests (PART 1)


📈 33.18 Punkte
🎥 Video | Youtube

📰 GitHub führt Reaktionen auf Pull Requests, Issues und Kommentare ein


📈 33.18 Punkte
📰 IT Nachrichten

🎥 The power of GitHub Copilot Chat for pull requests (PART 2)


📈 33.18 Punkte
🎥 Video | Youtube

📰 GitHub Desktop 3.2: Vorschau für deine Pull Requests


📈 33.18 Punkte
📰 IT Nachrichten

📰 GitHub Desktop 3.2 bietet lokale Vorschau für Pull Requests


📈 33.18 Punkte
📰 IT Nachrichten

📰 GitHub für iOS: Pull-Requests lassen sich jetzt auch schnell mobil bearbeiten


📈 33.18 Punkte
📰 IT Nachrichten

🕵️ Microsoft GitHub Pull Requests and Issues Extension on Visual Studio Remote Code Execution


📈 33.18 Punkte
🕵️ Sicherheitslücken

🕵️ GitHub rolls out dependency review, vulnerability alerts for pull requests


📈 33.18 Punkte
🕵️ Hacking

🔧 Pull Requests and Code Reviews: Collaborate Effectively on GitHub


📈 33.18 Punkte
🔧 Programmierung

🕵️ GitHub Security Lab: Golang : Improvements to Golang SSRF query


📈 32.24 Punkte
🕵️ Sicherheitslücken

🔧 Why can't I set "merged" Pull Request trigger on GitHub Actions?


📈 30.87 Punkte
🔧 Programmierung

🔧 [GitHub Actions] How to Automatically Run npm Update and Create a Pull Request


📈 30.87 Punkte
🔧 Programmierung

🔧 [GitHub Actions] How to Automatically Run npm Update and Create a Pull Request


📈 30.87 Punkte
🔧 Programmierung

🔧 Deploying a Vite app on GitHub Pages using GitHub Actions with GitHub Secrets


📈 30.54 Punkte
🔧 Programmierung

🔧 Applying Unit Tests on NestJS with Jest and GitHub Actions


📈 28.94 Punkte
🔧 Programmierung

matomo