From 1260b7484168c5a8d4c5e775e1454a2089d704de Mon Sep 17 00:00:00 2001 From: Simo Aleksandrov Date: Fri, 8 Oct 2021 13:58:16 +0300 Subject: [PATCH 1/4] chore: rm cpu.prof --- cpu.prof | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 cpu.prof diff --git a/cpu.prof b/cpu.prof deleted file mode 100644 index e69de29..0000000 From 4f2124ad62661df25bc1221492b47125ce7bf256 Mon Sep 17 00:00:00 2001 From: Simo Aleksandrov Date: Fri, 8 Oct 2021 14:04:25 +0300 Subject: [PATCH 2/4] feat: run tests on CI --- .github/workflows/github-actions.yaml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github-actions.yaml b/.github/workflows/github-actions.yaml index b1c3622..80aebd3 100644 --- a/.github/workflows/github-actions.yaml +++ b/.github/workflows/github-actions.yaml @@ -6,15 +6,23 @@ on: tags: - '*' jobs: + test: + runs-on: ubuntu-latest + steps: + - run: echo "Testing Abacus" + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + - name: Run tests + run: go test -v -covermode=atomic -race ./... build-and-release: runs-on: ubuntu-latest + needs: [ test ] steps: - run: echo "Building Abacus" - - name: Check out repository code - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - uses: actions/setup-go@v2 - name: Build step - run: | + run: | GOOS=windows GOARCH=amd64 go build -o abacus-windows-amd64.exe GOOS=linux GOARCH=amd64 go build -o abacus-linux-amd64 GOOS=darwin GOARCH=amd64 go build -o abacus-macos-amd64 @@ -24,6 +32,6 @@ jobs: with: artifacts: "abacus-*" commit: main - tag: ${{ env.VERSION_TAG }} - name: abacus ${{ env.VERSION_TAG }} + tag: ${{ env.VERSION_TAG }} + name: abacus ${{ env.VERSION_TAG }} token: ${{ secrets.GITHUB_TOKEN }} From 351fccb252f6d756d446c634a7be203c2670b412 Mon Sep 17 00:00:00 2001 From: Simo Aleksandrov Date: Fri, 8 Oct 2021 14:04:46 +0300 Subject: [PATCH 3/4] chore: bump version --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 6874aab..7f96a2c 100644 --- a/main.go +++ b/main.go @@ -56,7 +56,7 @@ type args struct { } func (args) Version() string { - return "v1.2.4\n" + return "v1.2.5\n" } func (args) Description() string { return "abacus - a simple interactive calculator CLI with support for variables, lambdas, comparison checks, and math functions\n" From 151be1735a71faaaf39f60209a4c103b0a4728ad Mon Sep 17 00:00:00 2001 From: Simo Aleksandrov Date: Fri, 8 Oct 2021 14:12:45 +0300 Subject: [PATCH 4/4] feat: only run build-and-release on main, make full workflow run on push --- .github/workflows/github-actions.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github-actions.yaml b/.github/workflows/github-actions.yaml index 80aebd3..b62ed04 100644 --- a/.github/workflows/github-actions.yaml +++ b/.github/workflows/github-actions.yaml @@ -1,10 +1,5 @@ name: Abacus build routine -on: - push: - branches: - - main - tags: - - '*' +on: push jobs: test: runs-on: ubuntu-latest @@ -17,6 +12,7 @@ jobs: build-and-release: runs-on: ubuntu-latest needs: [ test ] + if: github.ref == 'refs/heads/main' steps: - run: echo "Building Abacus" - uses: actions/checkout@v2