forked from knative/func
-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (37 loc) · 1.14 KB
/
test-unit.yaml
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
name: Func Unit Test
on: [pull_request]
jobs:
test:
name: Unit Test
strategy:
matrix:
go: [1.18.x]
java: [17]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Install Bash 4 on Mac
if: matrix.os == 'macos-latest'
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew install bash
brew install gnu-sed
echo "/usr/local/bin" >> $GITHUB_PATH
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
- run: git config --global core.autocrlf false
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Core Unit Tests
run: make test
- name: Template Unit Tests
run: make test-templates
- uses: codecov/codecov-action@v3
with:
files: ./coverage.txt
flags: unit-tests-${{ matrix.os }}