-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.48 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
on:
pull_request:
branches: [master]
push:
branches: [master]
tags:
- v*
name: Test
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: ConorMacBride/install-package@v1
with:
brew: libgfshare
apt: libgfshare-bin rpm
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- run: make test
- uses: paambaati/[email protected]
if: matrix.os == 'ubuntu-latest'
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
prefix: github.com/corvus-ch/horcrux/
coverageLocations: |
${{github.workspace}}/c.out:gocov
- uses: goreleaser/goreleaser-action@v6
if: matrix.os == 'ubuntu-latest'
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
path: dist/horcrux_*-*
- if: matrix.os == 'ubuntu-latest' && startsWith(github.ref, 'refs/tags/')
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
run: |
sudo gem install package_cloud
package_cloud push corvus-ch/tools/any/any dist/*.deb
package_cloud push corvus-ch/tools/rpm_any/rpm_any dist/*.rpm