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

ci: run examples against latest go-ipfs even in forks #8554

Merged
merged 1 commit into from
Nov 17, 2021
Merged
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
15 changes: 13 additions & 2 deletions .circleci/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,21 @@ jobs:
command: bash <(curl -s https://codecov.io/bash) -cF unittests -X search -f coverage/unit_tests.coverprofile
- run:
command: |
current=$(git rev-parse HEAD)
go get github.com/ipfs/go-ipfs@$current
# we want to test the examples against the current version of go-ipfs
# however, that version might be in a fork so we need to replace the dependency

# backup the go.mod and go.sum files to restore them after we run the tests
cp go.mod go.mod.bak
cp go.sum go.sum.bak

# make sure the examples run against the current version of go-ipfs
go mod edit -replace github.com/ipfs/go-ipfs=./../../..
aschmahmann marked this conversation as resolved.
Show resolved Hide resolved
go mod tidy
go test -v ./...

# restore the go.mod and go.sum files to their original state
mv go.mod.bak go.mod
mv go.sum.bak go.sum
working_directory: ~/ipfs/go-ipfs/docs/examples/go-ipfs-as-a-library

- run:
Expand Down