Skip to content

Commit

Permalink
workflow: enable macOS in CI without conditions (#327)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuchen Cheng <rudeigerc@gmail.com>
  • Loading branch information
rudeigerc authored Jun 14, 2022
1 parent 35ef36d commit c80082b
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,11 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
version: v1.46.2
setup:
name: setup
runs-on: ubuntu-latest
outputs:
os: ${{ steps.setup.outputs.os }}
steps:
- name: setup
id: setup
run: |
if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}; then
os='["ubuntu-latest","macos-latest"]'
else
os='["ubuntu-latest"]'
fi
list=$(echo ${os} | jq -c)
echo "::set-output name=os::${list}"
test:
name: test
needs: setup
strategy:
matrix:
os: ${{ fromJson(needs.setup.outputs.os) }}
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
GOPATH: ${{ github.workspace }}/go
Expand Down Expand Up @@ -122,10 +105,9 @@ jobs:
parallel: true
build:
name: build
needs: setup
strategy:
matrix:
os: ${{ fromJson(needs.setup.outputs.os) }}
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
GOPATH: ${{ github.workspace }}/go
Expand Down

0 comments on commit c80082b

Please sign in to comment.