mirror of
https://github.com/Brawl345/stargazer.git
synced 2024-11-16 21:29:21 +01:00
Test seperate CI
This commit is contained in:
parent
4a9bbe0daa
commit
19a99597fc
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user