-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: add t0124 with ipns fixtures #37
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
55abe96
feat: add ipns fixtures
laurentsenta 7c8edd0
test: complete & fix t0116 ipns
laurentsenta a9604fa
fix: update name in t0124
laurentsenta aef104e
fix: remove dead code
laurentsenta 9c273ed
refactor: upgrade with latest boxo
laurentsenta 6da4a74
doc: update README.md
laurentsenta ee8d8a6
ci: propagat import errors
laurentsenta 38b9505
ci: bump go version
laurentsenta 7c12501
ci: update provisioning to fail as expected
laurentsenta ac32846
ci: add kubo test for master
laurentsenta 41a595b
ci: fix import
laurentsenta 90aec1d
core: add arbitrary timeout on requests
laurentsenta d3e25ce
fix: add fixture ids
laurentsenta 03d24a0
fix: naming ipnsKey
laurentsenta 2d532a3
fix: test name in ipns record
laurentsenta 3ca2da3
ci: use test matrix for kubo version in test
laurentsenta ab51e6d
ci: fail fast during testing
laurentsenta de8e17b
fix: docs
laurentsenta 08d2e44
fix: IPNSRecord naming
laurentsenta 6999e7d
feat: ipns check requires IsValid call
laurentsenta 6520160
fix: go fmt
laurentsenta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,33 +7,52 @@ on: | |
jobs: | ||
test: | ||
runs-on: 'ubuntu-latest' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: ['latest', 'master'] | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19.1 | ||
go-version: 1.20.4 | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: 'gateway-conformance' | ||
- name: Extract fixtures | ||
uses: ./gateway-conformance/.github/actions/extract-fixtures | ||
with: | ||
output: fixtures | ||
- uses: ipfs/download-ipfs-distribution-action@v1 | ||
- uses: protocol/cache-go-action@v1 | ||
- run: go install github.com/ipfs/kubo/cmd/ipfs@${{ matrix.target }} | ||
shell: bash | ||
- name: Configure Kubo Gateway | ||
run: | | ||
ipfs init; | ||
source ./gateway-conformance/kubo-config.example.sh; | ||
IPFS_NS_MAP=$(cat ./fixtures/dnslinks.json | jq -r 'to_entries | map("\(.key).example.com:\(.value)") | join(",")') | ||
echo "IPFS_NS_MAP=${IPFS_NS_MAP}" >> $GITHUB_ENV | ||
# note: the IPFS_NS_MAP set above will be passed the daemon: | ||
# note: the IPFS_NS_MAP set above will be passed the daemon | ||
- uses: ipfs/start-ipfs-daemon-action@v1 | ||
- name: Provision Kubo Gateway | ||
run: | | ||
find ./fixtures -name '*.car' -exec ipfs dag import {} \; | ||
# Import car files | ||
cars=$(find ./fixtures -name '*.car') | ||
for car in $cars | ||
do | ||
ipfs dag import "$car" | ||
done | ||
|
||
# Import ipns records | ||
records=$(find ./fixtures -name '*.ipns-record') | ||
for record in $records | ||
do | ||
key=$(basename -s .ipns-record "$record" | cut -d'_' -f1) | ||
ipfs routing put --allow-offline "/ipns/$key" "$record" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💭 (not a blocker, just a note for the future) when ipfs/specs#369 is figured out, we will be able to remove our reliance on |
||
done | ||
- name: Run the tests | ||
uses: ./gateway-conformance/.github/actions/test | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Binary file added
BIN
+394 Bytes
fixtures/t0116/k51qzi5uqu5dlxdsdu5fpuu7h69wu4ohp32iwm9pdt9nq3y5rpn3ln9j12zfhe.ipns-record
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+392 Bytes
fixtures/t0124/k51qzi5uqu5dh71qgwangrt6r0nd4094i88nsady6qgd1dhjcyfsaqmpp143ab.ipns-record
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't actually use Go here right now, do we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, but we will with the matrix!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the catch; probably a leftover from before the containerization 👍
Note I'll merge the two tests.yml, which means we'll need go because we want to call:
In place of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably could get away with using the default from the machine for this but it's fine to leave it in.