-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (48 loc) · 1.36 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
name: 'Test'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53
test: # make sure the action works on a clean machine without building
strategy:
matrix:
go-version:
- 1.20.x
mruby-version:
- 3.2.0
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Setup mruby
uses: elct9620/setup-mruby@main
with:
mruby-version: ${{ matrix.mruby-version }}
- name: Run Test with CodeClimate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: go test -v -coverprofile coverage.out ./...
prefix: github.com/${{ github.event.repository.full_name }}
coverageLocations:
"${{github.workspace}}/coverage.out:gocov"