mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-06 19:44:01 +08:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
157 lines
5.0 KiB
YAML
157 lines
5.0 KiB
YAML
name: Interop
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
|
|
env:
|
|
GO_VERSION: 1.21.x
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
interop-prep:
|
|
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
env:
|
|
TEST_DOCKER: 0
|
|
TEST_FUSE: 0
|
|
TEST_VERBOSE: 1
|
|
TRAVIS: 1
|
|
GIT_PAGER: cat
|
|
IPFS_CHECK_RCMGR_DEFAULTS: 1
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
- uses: actions/checkout@v4
|
|
- run: make build
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: kubo
|
|
path: cmd/ipfs/ipfs
|
|
helia-interop:
|
|
needs: [interop-prep]
|
|
runs-on: ${{ fromJSON(github.repository == 'ipfs/kubo' && '["self-hosted", "linux", "x64", "2xlarge"]' || '"ubuntu-latest"') }}
|
|
timeout-minutes: 20
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: kubo
|
|
path: cmd/ipfs
|
|
- run: chmod +x cmd/ipfs/ipfs
|
|
- run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
|
|
id: npm-cache-dir
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
|
key: ${{ runner.os }}-${{ github.job }}-helia-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: ${{ runner.os }}-${{ github.job }}-helia-
|
|
- run: sudo apt update
|
|
- run: sudo apt install -y libxkbcommon0 libxdamage1 libgbm1 libpango-1.0-0 libcairo2 # dependencies for playwright
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: ipfs/helia
|
|
fetch-depth: 1
|
|
path: interop
|
|
ref: 'ea5533c794df844c9fb9812e85e2f5e6af09efeb' # temporary while this commit is being released
|
|
- name: Checkout latest tag
|
|
run: |
|
|
exit 0 # temporary while ea5533c794df844c9fb9812e85e2f5e6af09efeb is released
|
|
export TAG="$(git describe --tags --abbrev=0)"
|
|
echo "Running tests against: $TAG"
|
|
git checkout "$TAG"
|
|
working-directory: interop
|
|
- run: npm install
|
|
working-directory: interop
|
|
- run: npm run build
|
|
working-directory: interop
|
|
- run: npm install
|
|
working-directory: interop/packages/interop
|
|
- run: npm test
|
|
working-directory: interop/packages/interop
|
|
env:
|
|
KUBO_BINARY: ${{ github.workspace }}/cmd/ipfs/ipfs
|
|
ipfs-webui:
|
|
needs: [interop-prep]
|
|
runs-on: ${{ fromJSON(github.repository == 'ipfs/kubo' && '["self-hosted", "linux", "x64", "2xlarge"]' || '"ubuntu-latest"') }}
|
|
timeout-minutes: 20
|
|
env:
|
|
NO_SANDBOX: true
|
|
LIBP2P_TCP_REUSEPORT: false
|
|
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
|
|
E2E_IPFSD_TYPE: go
|
|
TRAVIS: 1
|
|
GIT_PAGER: cat
|
|
IPFS_CHECK_RCMGR_DEFAULTS: 1
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18.14.0
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: kubo
|
|
path: cmd/ipfs
|
|
- run: chmod +x cmd/ipfs/ipfs
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: ipfs/ipfs-webui
|
|
path: ipfs-webui
|
|
- run: |
|
|
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
|
|
id: npm-cache-dir
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
|
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-${{ github.job }}-
|
|
- env:
|
|
NPM_CACHE_DIR: ${{ steps.npm-cache-dir.outputs.dir }}
|
|
run: |
|
|
npm ci --prefer-offline --no-audit --progress=false --cache "$NPM_CACHE_DIR"
|
|
npx playwright install --with-deps
|
|
working-directory: ipfs-webui
|
|
- id: ref
|
|
run: echo "ref=$(git rev-parse --short HEAD)" | tee -a $GITHUB_OUTPUT
|
|
working-directory: ipfs-webui
|
|
- id: state
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
ENDPOINT: repos/ipfs/ipfs-webui/commits/${{ steps.ref.outputs.ref }}/status
|
|
SELECTOR: .state
|
|
KEY: state
|
|
run: gh api "$ENDPOINT" --jq "$SELECTOR" | xargs -I{} echo "$KEY={}" | tee -a $GITHUB_OUTPUT
|
|
- name: Build ipfs-webui@main (state=${{ steps.state.outputs.state }})
|
|
run: npm run test:build
|
|
working-directory: ipfs-webui
|
|
- name: Test ipfs-webui@main (state=${{ steps.state.outputs.state }}) E2E against the locally built Kubo binary
|
|
run: npm run test:e2e
|
|
env:
|
|
IPFS_GO_EXEC: ${{ github.workspace }}/cmd/ipfs/ipfs
|
|
working-directory: ipfs-webui
|