Skip to content

Commit

Permalink
Merge pull request #10 from rpcpool/test-workflows
Browse files Browse the repository at this point in the history
Add tests workflow
  • Loading branch information
gagliardetto authored Jun 15, 2023
2 parents c8833df + 464a36f commit ce2599f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
name: main

on:
pull_request:
push:
tags:
- '*'
- "v*.*.*"

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup go env
uses: actions/setup-go@v3
with:
go-version: '1.20'
check-latest: true
- name: Setup go env
uses: actions/setup-go@v3
with:
go-version: '1.20'
check-latest: true

- name: Build cli
run: make
- name: Build cli
run: make compile-all

- name: Publish to release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
bin/faithful-cli
- name: Publish to release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
bin/darwin/amd64/faithful-cli_darwin_amd64
bin/darwin/arm64/faithful-cli_darwin_arm64
bin/linux/amd64/faithful-cli_linux_amd64
bin/windows/amd64/faithful-cli_windows_amd64.exe
20 changes: 20 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on: [pull_request]
name: tests
jobs:
test:
strategy:
matrix:
go-version: [1.20.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Test
run: go test ./...

0 comments on commit ce2599f

Please sign in to comment.