-
Notifications
You must be signed in to change notification settings - Fork 471
44 lines (43 loc) · 1.46 KB
/
tools.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
# Test tools directories that have their own go.mod files, and
# otherwise wouldn't get tested along with the main go-algorand build.
name: Test tools modules
on:
push:
branches:
- master
paths:
- 'tools/block-generator/**'
- 'tools/x-repo-types/**'
pull_request:
paths:
- 'tools/block-generator/**'
- 'tools/x-repo-types/**'
jobs:
tools_test:
name: Test tools modules
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/[email protected]
# move go out of the way temporarily to avoid "go list ./..." from installing modules
- name: Make libsodium.a
run: sudo mv /usr/bin/go /usr/bin/go.bak && make crypto/libs/linux/amd64/lib/libsodium.a && sudo mv /usr/bin/go.bak /usr/bin/go
- name: Add bin to PATH
run: |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
echo "$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin" >> $GITHUB_PATH
- name: Determine Go version
id: go_version
run: echo "GO_VERSION=$(./scripts/get_golang_version.sh)" >> $GITHUB_ENV
- name: Install go version
uses: actions/[email protected]
with:
go-version: ${{ env.GO_VERSION }}
- name: Test tools/block-generator
run: |
cd tools/block-generator
go test -v ./...
- name: Test tools/x-repo-types
run: |
cd tools/x-repo-types
go test -v ./...