Skip to content

Commit

Permalink
ci: adding macos build (devstream-io#309)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Hu <[email protected]>
  • Loading branch information
daniel-hutao authored Mar 14, 2022
1 parent 41b1a3f commit 9ad549e
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 55 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
name: golangci-lint

on:
push:
tags:
- v*
branches:
- main
pull_request:

permissions:
contents: read

jobs:
golangci:
name: lint
golang-lint:
name: Golang lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-commit-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: lint-commit-message
on: [ pull_request ]

jobs:
commit-msg:
lint-commit-message:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/main-builder.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/main-pushed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: pushed to main
on:
push:
branches: [ main ]
jobs:
build-and-test-on-linux:
runs-on: ubuntu-latest
steps:
- run: echo "🐧 This job is now running on a ${{ runner.os }}-${{ runner.arch }} server hosted by GitHub!"
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: make build
- name: Test
run: go test -v ./...
build-and-test-on-macos:
runs-on: macos-latest
steps:
- run: echo "🐧 This job is now running on a ${{ runner.os }}-${{ runner.arch }} server hosted by GitHub!"
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: make build
- name: Test
run: go test -v ./...
28 changes: 0 additions & 28 deletions .github/workflows/pr-builder.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/pr-created.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: pr created
on:
pull_request:
branches: [ main ]
jobs:
build-and-test-on-linux:
runs-on: ubuntu-latest
steps:
- run: echo "🐧 This job is now running on a ${{ runner.os }}-${{ runner.arch }} server hosted by GitHub!"
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: make build
- name: Test
run: go test -v ./...
build-and-test-on-macos:
runs-on: macos-latest
steps:
- run: echo "🐧 This job is now running on a ${{ runner.os }}-${{ runner.arch }} server hosted by GitHub!"
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: make build
- name: Test
run: go test -v ./...

0 comments on commit 9ad549e

Please sign in to comment.