Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix test flow to install libsodium #115

Merged
merged 4 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- name: Build
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build
if: env.GIT_DIFF
Expand Down Expand Up @@ -99,13 +100,21 @@ jobs:
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}"
if: env.GIT_DIFF
- name: install libsodium
run: |
make libsodium
if: env.GIT_DIFF
- name: test & coverage report creation
env:
CGO_CFLAGS: "-I${{ github.workspace }}/tools/sodium/linux_amd64/include"
CGO_LDFLAGS: "-L${{ github.workspace }}/tools/sodium/linux_amd64/lib -lsodium"
run: |
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='ledger test_ledger_mock goleveldb libsodium'
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='ledger test_ledger_mock goleveldb gcc libsodium'
if: env.GIT_DIFF
- uses: actions/upload-artifact@v3
with:
Expand All @@ -123,6 +132,7 @@ jobs:
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-00-coverage"
Expand Down Expand Up @@ -178,13 +188,21 @@ jobs:
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}"
if: env.GIT_DIFF
- name: install libsodium
run: |
make libsodium
if: env.GIT_DIFF
- name: test & coverage report creation
env:
CGO_CFLAGS: "-I${{ github.workspace }}/tools/sodium/linux_amd64/include"
CGO_LDFLAGS: "-L${{ github.workspace }}/tools/sodium/linux_amd64/lib -lsodium"
run: |
xargs --arg-file=pkgs.txt.part.${{ matrix.part }} go test -mod=readonly -json -timeout 30m -tags='cli_test goleveldb libsodium' | tee ${{ matrix.part }}-integration-output.txt
xargs --arg-file=pkgs.txt.part.${{ matrix.part }} go test -mod=readonly -json -timeout 30m -tags='cli_test goleveldb gcc libsodium' | tee ${{ matrix.part }}-integration-output.txt
if: env.GIT_DIFF
- uses: actions/upload-artifact@v3
with:
Expand All @@ -203,6 +221,7 @@ jobs:
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-00-integration-output"
Expand Down Expand Up @@ -246,6 +265,7 @@ jobs:
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}"
Expand All @@ -271,6 +291,7 @@ jobs:
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-00-integration-multi-node-output"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Bug Fixes
* (global) [\#103](https://github.com/line/lbm/pull/103) replace deprecated functions of ioutil package
* (app) [\#107](https://github.com/line/lbm/pull/107) change module order in `init genesis`
* (ci) [\#115](https://github.com/line/lbm/pull/115) fix test flow to install libsodium

### Improvements

Expand Down