From d3b28ad859ff745d67903b6975f27716ce819f44 Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Fri, 19 Jan 2024 14:39:39 +0100 Subject: [PATCH 1/4] add github action --- .github/workflows/test.yml | 27 +++++++++++++++++++++++++++ README.md | 4 ++++ 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..0852e12 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: Test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: macos-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@v2 + + - name: Set up Homebrew + run: | + brew update + brew tap homebrew/cask + + - name: Test Formulae + run: | + brew install --build-from-source Formula/*.rb + brew test Formula/*.rb + brew audit --strict --online Formula/*.rb + diff --git a/README.md b/README.md index b9706e6..bd77cef 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,10 @@ Or `brew tap siafoundation/sia` and then `brew install `. +### Available Formulae + +- [renterd](https://github.com/SiaFoundation/renterd) + ## Documentation `brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh). From b6cd5ff7f8ef23b576ef77e592e9b3c21d00dba7 Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Fri, 19 Jan 2024 14:53:27 +0100 Subject: [PATCH 2/4] unlink go 1.2 --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0852e12..2986e2e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,12 +12,13 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Homebrew run: | brew update brew tap homebrew/cask + brew remove go@1.20 - name: Test Formulae run: | From 85f19d7f1fd1b692dea47e73f9ee02baca06684c Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Fri, 19 Jan 2024 15:37:55 +0100 Subject: [PATCH 3/4] separate audit job --- .github/workflows/test.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2986e2e..442c120 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,11 +18,17 @@ jobs: run: | brew update brew tap homebrew/cask - brew remove go@1.20 + brew uninstall --ignore-dependencies go@1.20 # remove old version of go - - name: Test Formulae + - name: Install and Test Formulae run: | brew install --build-from-source Formula/*.rb brew test Formula/*.rb - brew audit --strict --online Formula/*.rb + + - name: Audit Formulae + run: | + for formula in Formula/*.rb; do + formula_name=$(basename $formula .rb) + brew audit --strict --online $formula_name + done From 7253a5021b0b616549021e28752bf1b588f91196 Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Fri, 19 Jan 2024 15:42:59 +0100 Subject: [PATCH 4/4] split up further --- .github/workflows/test.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 442c120..f7099b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,12 +20,13 @@ jobs: brew tap homebrew/cask brew uninstall --ignore-dependencies go@1.20 # remove old version of go - - name: Install and Test Formulae - run: | - brew install --build-from-source Formula/*.rb - brew test Formula/*.rb + - name: Install + run: brew install --build-from-source Formula/*.rb + + - name: Test + run: brew test Formula/*.rb - - name: Audit Formulae + - name: Audit run: | for formula in Formula/*.rb; do formula_name=$(basename $formula .rb)