Skip to content

Commit 4f5591b

Browse files
authored
Merge pull request #44 from 2color/use-ipfs-action
Use official ipfs action to download Kubo in ci workflow
2 parents 474c142 + 01ea5d3 commit 4f5591b

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

.github/workflows/local_gateway.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ on: [push, pull_request]
44

55
jobs:
66
test:
7-
7+
name: Python ${{ matrix.python-version }} / Kubo ${{ matrix.kubo-version }}
88
runs-on: ubuntu-latest
99
strategy:
1010
max-parallel: 4
1111
matrix:
1212
python-version: ["3.11", "3.12", "3.13"]
13-
ipfs-version: ["0.30.0"]
13+
kubo-version: ["0.39.0"]
1414
steps:
1515
- uses: actions/checkout@v1
1616
- name: Set up Python ${{ matrix.python-version }}
@@ -21,20 +21,15 @@ jobs:
2121
run: |
2222
python -m pip install --upgrade pip
2323
pip install -e .
24-
- name: Install ipfs
25-
run: |
26-
wget https://dist.ipfs.io/go-ipfs/v${{ matrix.ipfs-version }}/go-ipfs_v${{ matrix.ipfs-version }}_linux-amd64.tar.gz
27-
tar -xvzf go-ipfs_v${{ matrix.ipfs-version }}_linux-amd64.tar.gz
28-
pushd go-ipfs
29-
sudo bash install.sh
30-
sudo sysctl -w net.core.rmem_max=2500000
31-
popd
32-
ipfs --version
33-
ipfs init --profile server
34-
touch ipfs.log
35-
ipfs daemon 2>ipfs.log | grep -i -o -m1 'Daemon is ready' & tail -f --pid=$! ipfs.log
36-
ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme
37-
ipfs dag import test/testdata.car
24+
- name: Install IPFS
25+
uses: ipfs/download-ipfs-distribution-action@v1
26+
with:
27+
name: kubo
28+
version: v${{ matrix.kubo-version }}
29+
- name: Start IPFS daemon
30+
uses: ipfs/start-ipfs-daemon-action@v1
31+
- name: Import test data
32+
run: ipfs dag import test/testdata.car
3833
- name: Test with pytest
3934
run: |
4035
pip install pytest pytest-asyncio

0 commit comments

Comments
 (0)