Test seperate CI

This commit is contained in:
Andreas Bielawski 2022-06-25 23:40:02 +02:00
parent 4a9bbe0daa
commit 19a99597fc
Signed by: Brawl
GPG Key ID: 851D5FF3B79056CA

View File

@ -1,4 +1,4 @@
name: Build
name: Build & Test
on:
- push
- pull_request
@ -8,7 +8,30 @@ env:
NAME: stargazer
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GOVER }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
~\AppData\Local\go-build
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- run: go test ./...
build:
needs: test
name: build
runs-on: ubuntu-latest
strategy:
@ -42,10 +65,6 @@ jobs:
with:
go-version: ${{ env.GOVER }}
- name: Run tests
working-directory: pkg/stargazer
run: go test
- name: Build
env:
GOOS: ${{ matrix.GOOS }}
@ -63,4 +82,3 @@ jobs:
name: ${{env.NAME}}-${{ matrix.GOOS }}-${{ matrix.GOARCH }}-${{github.sha}}
path: dist/*
retention-days: 90