Skip to content

Commit

Permalink
fix: fix test flow to install libsodium (#803)
Browse files Browse the repository at this point in the history
* Add test.yml to diff target

* install libsodium

* Update CHANGELOG

* Update CHANGELOG

* Use `GITHUB_WORKSPACE`

* Fix test.yml

* Fix test.yml

* Fix test.yml

* Fix test.yml
  • Loading branch information
ulbqb authored Nov 21, 2022
1 parent 3330562 commit b13f437
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- name: Build
run: GOOS=linux CGO_ENABLED=1 GOARCH=${{ matrix.goarch }} CC=${{ matrix.gcc }} LEDGER_ENABLED=false make build

Expand Down Expand Up @@ -129,16 +130,23 @@ 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:
USE_PRELOAD: 1,4
SAVE_BRANCH_LAUNCH_DEPTH: 1
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='norace 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='norace ledger test_ledger_mock goleveldb gcc libsodium'
if: env.GIT_DIFF
- uses: actions/upload-artifact@v3
with:
Expand All @@ -156,6 +164,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 @@ -209,17 +218,24 @@ 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:
USE_PREFETCH: NO
USE_PRELOAD: 1,4
SAVE_BRANCH_LAUNCH_DEPTH: 1
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 -timeout 30m -race -tags='cgo ledger test_ledger_mock goleveldb libsodium'
xargs --arg-file=pkgs.txt.part.${{ matrix.part }} go test -mod=readonly -timeout 30m -race -tags='cgo ledger test_ledger_mock goleveldb gcc libsodium'
if: env.GIT_DIFF
- uses: actions/upload-artifact@v3
with:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (baseapp) [\#781](https://github.com/line/lbm-sdk/pull/781) implement method `SetOption()` in baseapp
* (global) [\#782](https://github.com/line/lbm-sdk/pull/782) add unhandled return error handling
* (x/collection,x/token) [\#798](https://github.com/line/lbm-sdk/pull/798) Fix x/collection ModifyContract
* (ci) [\#803](https://github.com/line/lbm-sdk/pull/803) fix test flow to install libsodium

### Breaking Changes
* (cli) [\#773](https://github.com/line/lbm-sdk/pull/773) guide users to use generate-only in messages for x/foundation authority
Expand Down

0 comments on commit b13f437

Please sign in to comment.