mirror of
https://github.com/Brawl345/stargazer.git
synced 2024-11-17 05:39:19 +01:00
Update CI
This commit is contained in:
parent
19a99597fc
commit
f73c99b79d
33
.github/workflows/build.yml
vendored
33
.github/workflows/build.yml
vendored
@ -4,7 +4,6 @@ on:
|
|||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GOVER: ^1.18
|
|
||||||
NAME: stargazer
|
NAME: stargazer
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -14,21 +13,27 @@ jobs:
|
|||||||
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@v3
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.GOVER }}
|
go-version-file: 'go.mod'
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/cache@v3
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/go/pkg/mod
|
~/go/pkg/mod
|
||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
~/Library/Caches/go-build
|
~/Library/Caches/go-build
|
||||||
~\AppData\Local\go-build
|
~\AppData\Local\go-build
|
||||||
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ env.GOVER }}-${{ hashFiles('**/go.sum') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-go-${{ matrix.go-version }}-
|
${{ runner.os }}-go-${{ env.GOVER }}-
|
||||||
- run: go test ./...
|
- name: Run tests
|
||||||
|
run: go test ./...
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: test
|
needs: test
|
||||||
@ -47,11 +52,16 @@ jobs:
|
|||||||
GOARCH: arm
|
GOARCH: arm
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Cache
|
- name: Cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
@ -60,11 +70,6 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-go-
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Setup Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: ${{ env.GOVER }}
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
GOOS: ${{ matrix.GOOS }}
|
GOOS: ${{ matrix.GOOS }}
|
||||||
|
Loading…
Reference in New Issue
Block a user