From d72ab44e90cf11e52307e9354d7b1f46b7ff9670 Mon Sep 17 00:00:00 2001 From: Daniel Antonsen <44880186+root4loot@users.noreply.github.com> Date: Fri, 4 Oct 2024 23:52:10 +0200 Subject: [PATCH] feat: add GitHub Actions workflow for CLI testing and update README badge --- .github/workflows/test-cli.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/test-daily.yml | 3 +++ README.md | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-cli.yml diff --git a/.github/workflows/test-cli.yml b/.github/workflows/test-cli.yml new file mode 100644 index 0000000..92446fa --- /dev/null +++ b/.github/workflows/test-cli.yml @@ -0,0 +1,30 @@ +name: Test CLI + +on: + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: "0 8 * * *" + +jobs: + test-cli: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.23" + + - name: Install Dependencies + run: go mod download + + - name: Run CLI Tests + run: go test -v ./cmd diff --git a/.github/workflows/test-daily.yml b/.github/workflows/test-daily.yml index a5f626d..8a3b8d6 100644 --- a/.github/workflows/test-daily.yml +++ b/.github/workflows/test-daily.yml @@ -1,6 +1,9 @@ name: Test Daily on: + push: + branches: + - main schedule: - cron: "0 8 * * *" diff --git a/README.md b/README.md index 4ca92b0..82bd283 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Intigriti](https://github.com/root4loot/rescope/actions/workflows/test-intigriti.yml/badge.svg?branch=main)](https://github.com/root4loot/rescope/actions/workflows/test-intigriti.yml) [![YesWeHack](https://github.com/root4loot/rescope/actions/workflows/test-yeswehack.yml/badge.svg?branch=main)](https://github.com/root4loot/rescope/actions/workflows/test-yeswehack.yml) [![HackenProof](https://github.com/root4loot/rescope/actions/workflows/test-hackenproof.yml/badge.svg?branch=main)](https://github.com/root4loot/rescope/actions/workflows/test-hackenproof.yml) -![Test CLI](https://github.com/root4loot/rescope/actions/workflows/test.yml/badge.svg?branch=main) +[![Test CLI](https://github.com/root4loot/rescope/actions/workflows/test-cli.yml/badge.svg?branch=main)](https://github.com/root4loot/rescope/actions/workflows/test-cli.yml) ![Twitter Follow](https://img.shields.io/twitter/follow/danielantonsen.svg?style=dark)