forked from aws/amazon-ecs-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.32 KB
/
linux.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
name: Linux
on: [pull_request]
permissions: read-all
jobs:
unit-tests:
name: Linux unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: src/github.com/aws/amazon-ecs-agent
- name: get GO_VERSION
id: get-go-version
run: |
cd $GITHUB_WORKSPACE/src/github.com/aws/amazon-ecs-agent
set -eou pipefail
go_version=$(cat -e GO_VERSION)
go_version=${go_version%?}
go_version_length=${#go_version}
go_version_re="^([0-9]+\.){1,2}([0-9]+)$"
if ! [[ $go_version_length -le 10 && $go_version =~ $go_version_re ]] ; then
echo "invalid GO version"
exit 1
fi
echo "::set-output name=GO_VERSION::$go_version"
- uses: actions/setup-go@v2
with:
go-version: ${{ steps.get-go-version.outputs.GO_VERSION }}
- uses: actions/checkout@v2
with:
submodules: true
path: src/github.com/aws/amazon-ecs-agent
- name: make test
run: |
export GOPATH=$GITHUB_WORKSPACE
export GO111MODULE=auto
cd $GITHUB_WORKSPACE/src/github.com/aws/amazon-ecs-agent
make test-silent
make analyze-cover-profile
make test-init
make analyze-cover-profile-init